How to make a text field to accept a capital letter has or a number in the position of the first character and only the numbers after that?

Hi all

We have a text field in one of our screen in our mobile app. Currently the user can enter alpha numeric characters in this text field.

It is now that this field should accept a capital letter A or a number in the position of the first character and only the numbers after that.

Could someone let us know how to do this?

Thank you.

Or, how about the substitution of this abstract method in textFilter?

public boolean validate(character char,
                        AbstractString text
int position)

Tags: BlackBerry Developers

Similar Questions

  • How to make a text field repeat several times?

    I have created a form with the name of a client in it - and the name is repeated at the top of each page.  How to make a text field repeat several times? Thank you!

    Make sure that all fields have the same name (LastName FirstName, MiddleName,), then set the binding in the overall binding tab.

    Paul

  • How to make a text field required at run time when the user clicks on the box?

    I had a form, there are several checkboxes fields and the text associated with the check boxes. If the use clicks on the checkbox then partner

    text fields should become mandatory. I tried the change event and the click event of the boxes. There is error in the onChnage event and I got some odd results in the click event on. Sometimes, if the user clicks the check box, then for the 1st time the field is not required, then the user onclicks the box and when the user clicks the check box for the second time the field becomes necessary, but if I turns off the option highlight the field and selects the field becomes necessary even if the user onchecks I am totally confused! To add that I have also written an incorrect code always I reached the goal? How it can be possible. I write the codes below, please help me because I am working under a deadline from the client.

    onChange event:

    var = this.boundItem (xfa.event.newText) newVal;
    if(newVal == 0)
    {
    xfa.resolveNode ("form1. Subform0.Subform1.Subform9.Subform10.Table48.Row4.Purchasecost3_1'). validate.nullTest = "disabled";
    }
    on the other
    {
    xfa.resolveNode ("form1. Subform0.Subform1.Subform9.Subform10.Table48.Row4.Purchasecost3_1'). validate.nullTest = 'error ';
    }*/

    For the onClick event:

    var a = xfa.resolveNode ("form1..") RawValue Subform0.Subform1.Subform9.Subform10.Table48.row2.CostItemRecovere d_OnlyEnergyCharges");
    App.Alert (a);
    if(a == 0)
    {
    xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row4.ComplianceCheck__L1_1").validate.nullTest = 'error ';
    }
    if(a == 1)
    {
    xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row4.ComplianceCheck__L1_1").validate.nullTest = "disabled";
    }

    Please help someone!

    Hello

    You may need this resolved at this point, but here are a few tips.

    An example of a loop in a dynamic array is here: Re: how to make invisible/visible or hidden columns with checkbox?

    You are usually not necessary to resolve the nodes, especially when the script object is in the same table as the target objects.

    For example if the table was not static your script could be simplified:

    if (this.rawValue == "1")  // this object is in Row2
    {
         Row4.ComplianceCheck_L1_1.mandatory= "error";
    ...
    }
    

    However because you will be to loop through all the rows in the table repeatable instances / then you need to resolve the nodes. Take a look at the example above.

    In your script, you have to Row8 Row4. I don't know if this is repeatable or just some of them. If we take Row4 as being repetitive, then you can apply the following to all repeatable lines.

    var vRow4 = Table48._Row4.count;
    console.println("Row4: " + vRow4); // You can delete this or comment it out after testing
    
    if (this.rawValue == "1")  // this object is in Row2
    {
         for (var i=0; i
    

    I have not tested, but it should be close to work.

    Good luck

    Niall

  • How to make a text field so that if a user enters a lower case A, we make a capital?

    Hello

    We have a text field in one of our screens in the blackberry application.

    We have created the custom text filter so that the user can enter only the letters 'A' and the numbers in the text field. Now we need if the user enters 'a', we need to change it to 'A'.

    How can we achieve this?

    Thank you.

    Hi all

    I tried the following code and it worked.

    public char convert(char character, int status) {
        // TODO Auto-generated method stub
        if (!validate(character)) {
            return 0;
        }
        if (character == 'a') {
            return 'A';
        } else
            return character;
    }
    
  • How to make a text field is empty when you click on to.

    I have an input text box, if the user clicks "submit" and the box is empty, it returns "Please enter here response" in the input box. Is there a way to make sure when the user clicks in the box, it will turn back to white and be ready to type rather than having to select existing text, to delete?

    Thanks :)

    Yep, use the onSetFocus method.

    my_text_field_instance_name.OnSetFocus = function() {}
    my_text_field_instance_name. Text = "";
    }

    but be careful here, because if the user fills in that information, then click on the text field and then on again, the text will disappear, you will need to use a combo with onKillFocus or if increased... play with him. its real simple

    Corey

  • How to make readable text fields after the filling of data

    Hello

    Once we get the data in the message text entry fields, we have a few only readable areas.
    I tried to make these fields as readable as follows:

    In the property inspector Table RN, I changed the functional property of 'Read' only True value
    But in the custom OAF page, text box is missing for this field.
    Could someone help me how to do this?

    Thanks in advance
    Nanoo

    Hi Nanoo

    Here's the modified code, you can use

    public void setReadonly()
    {
    XXIDVOImpl vo=getXXVO1();
    Row poRow = vo.first();
    for(int i=0;i
    

    I hope that helps!

    Thank you
    AJ

  • How to make a text field for view-only / editable based on a user of APEX

    Hello

    I have a form with fields of 10-20 to assume.
    When the user - Admin logs, I want to field1 as editable, but when another user... User1 connects, I want to do this Field1 as display only... how I can do.

    Thank you
    Deepak

    Deepak

    You can remove the "View only" condition on the field and add this piece of javascript in the "foot" of the definition of the page

    
    

    CITY

    Published by: city has 12 August 2009 15:41

  • How to make a text field to autopopulate based on responses in two groups of option buttons

    I use Adobe Acrobat Pro and am very new to this.

    What I want to achieve:

    I have two sets of radio buttons; a group is the choice of 'Probability' and the other group is the choice of the "Consequence". Based on what the user takes away in these two groups, I want the form to automatically fill the level of risk in another area. For example If the user selects 'Negligible' in the Group result and 'Rare' in the Group of probability; the field entitled risk rating should display the word "Low". If they choose "Negligible" and "almost certain" the domain of the risk rating should show "moderate". Please let me know if you need further information. Thanks in advance.

    You can use something like this code as the custom field of risk assessment calculation script:

    var consequence = this.getField("Consequence").valueAsString;
    var likelihood = this.getField("Likelihood").valueAsString;
    
    if (consequence=="Insignificant" && likelihood=="Rare") event.value = "Low";
    else if (consequence=="Insignificant" && likelihood=="Almost Certain") event.value = "Moderate";
    // etc.
    else event.value = "";
    

    Edit: Small error fixed in code.

  • Hi, PDF form of the guru. How to make a text box become a required field IF a drop-down list is selected as the "Yes"?

    Hi, PDF form of the guru.

    How to make a text box becomes a "required field", IF a drop-down list is selected as the "Yes"?

    and 'not required' if the drop down menu selected as 'No' or left blank.

    Any help would be greatly appreciated

    see you soon

    Use this code in the custom drop-down list field validation script:

    this.getField("Text1").required = (event.value == "Yes");

    (Change "Text1" to the actual name of your text field, of course)

  • How can I make my text field automatically upper case?

    How can I make my text field in a form automatically uppercase?

    Use the following as custom hits JavaScript text field (select a Format type custom):

    Script from typo to text field

    Event.change = event.change.toUpperCase ();

  • How to make uneditable Date field in ADF

    Hello

    I use Jdev 11.1.1.7.1.

    In the fragment, I added the DATE of the ENTRY component. How to make uneditable date field. He should just take the input value of the grille.

    Kindly advice me.

    Thank you

    Swathi

    Your date. MinValue must be like this:

    
                
                
                  
              
    
  • How to make my text or image looks like rhinestones.  I would like to send to my cup.

    How to make my text or image looks like rhinestones.  I would like to send to my cup.

    You can take a look at the plugin ColliderScribe

  • Trial has just started... There is no button text only a text on a path tool... How to make a text box?

    Trial has just started... There is no button text only a text on a path tool... How to make a text box?

    The text button is under the text on a path button. Click and hold and it should reveal the buttons.

  • How to create a text field containing text/label which can be modified by the end user?

    Hello

    I'm trying to figure out how to create a text field containing text or a label that can be changed by the end user. Can do something like this in LiveCycle?

    Below, I have a text field that contains a question and another text field where the user will enter their answer. Is there a way to allow the end user to change the text of the question, as shown in the example?

    Capture.PNG

    Hello

    If you used a standard text for the 'legend' field you could set the value by default (in the value of the object palette tab) in the legend and the legend of the value None (in the page layout palette).

    Concerning

    Bruce

  • How to develop a text field (no scroll bar)

    First of all, thank you for your time - I'm on a date limit to produce and I'm freakin ', that's not possible.

    What I'm trying to do is create a simple form that has the text field (7).  Each of these text fields can contain anywhere from one sentence to six paragraphs of the explanatory text.  All I want to box in the text field to do is develop as well as the content and break to another page if necessary.  I was able to create a text field that allows the long data to appear (multiple lines / develop to fit Y), but the text field box does not grow, it adds a scroll bar to the place!  Unfortunately, this is not what I need.  I need the story to be printed and easily visible for viewing.

    Can you help me please?

    Here is an example that explains this se...

    Oh... Oh... I don't see the option to attach any file... I don't know that I did earlier

    Here's how I did it... just an example...

    1. open a new blank template.

    2. in the page, select body (Untitled subform) (page 1)... call First_Sub

    3 Textfield in First_Sub and set the Hight: "Expand to fit" and "Allow multiple lines" in page layout and the object > pallets of field respectively.

    4. now in the Higerarchy palette select 'Fisr_Sub' and set Hight: "Develop to fit" in the page layout palette

    5 then under object > subform set palette "allow Page brakes with content."

    6. don't forget save it as a dynamic form

    7 try it now... that should do what you are looking for.

    Good luck

Maybe you are looking for