Text entry mode and user input validation

Hey guys, someone tried to implement some sort of validation entry on BB 10?

According to the literature, we have TextField that can be assigned to one of the variants of TextFieldInputMode: URL, PhoneNumber, NumbersAndPunctuation etc.

There are no examples of this feature in action in the examples of Cascades source code on GitHub.

I tried almost all variants of documentation and that you do not notice any changes in the local keypad. It always shows all the characters with special keys for user able to grasp everything that he or she wants. I guess that's what we call 'Default' variant of the keyboard. It's not good for me. At least, I want to be able to transmit a user through the regular expression input and generate an alert if something is wrong with the supplied value. But it would be much better to limit user input to some variants of the keyboard (for ex, keypad only)

Here is my code:
TextField {}
ID: iValue
hintText: "enter your value.
inputMode: TextFieldInputMode.URL / / change this to what you want - without changes
bottomMargin: 50.0
textStyle {base: SystemDefaults.TextStyles.BodyText}

layoutProperties: {StackLayoutProperties}
horizontalAlignment: HorizontalAlignment.Fill
}
}

Is it possible to show only digital keyboard and, possibly, use a regexp validation of user input at the moment?

Yes, this guy's it via textChanging() signal and a regular expression.

See this post on - http://supportforums.blackberry.com/t5/Cascades-Development/Preventing-non-numeric-key-presses-in-a-...

Tags: BlackBerry Developers

Similar Questions

  • Changing the position of the cursor in a text entry field and remove digital zeros

    Flash8 - AS2

    It's good to be back after all these years and thank you for the people of faithfull as kglad, Ned Murphy, Rothrock and all others who give much of themselves to succeed this forum!

    My problem:

    I have a text entry field that is named in the box of properties like 'numberOfKids '.

    When the program is run, and a DELETE or BACKSPACE is pressed input textfield turns off

    and all the calculations that use the "numberOfKids" shows NaN.

    I got trapped in NaN and indefinite so that a digital 0 appears instead of a white one.

    There are two problems:

    First problem:

    The cursor to the left of zero, so the first number entered by the user is 10 x larger than what they want.  0 becomes 10.

    Question: How can I get the cursor to the right of 0?

    Second problem:

    When I manually move the cursor to the right of 0 and a number of entry, let's say 4, it appears like 04.

    Question 2: How to remove the zero digital in input textfield?

    Thanks for the help.

    Here is the code I use:

    calculateChildWeight = function () {}
    If (isNaN (numberOfKids)) {}
    numberOfKids = 0;
    }
    If ((numberOfKids) == undefined) {}
    numberOfKids = 0;
    }
    If (numberOfKids > = 0 & & numberOfKids < = 137) {}
    numberOfKids = numberOfKids;
    } else {}
    numberOfKids = 0;
    }
    If (isNaN (adjustedChildWeight)) {}
    adjustedChildWeight = 0;
    }
    If ((adjustedChildWeight) = undefined) {}
    adjustedChildWeight = 0;
    }
    adjustedChildWeight = Number (numberOfKids *(-100));
    numberOfKids.setSelection (numberOfKids.length, numberOfKids.length);
    If (numberOfKids.length = 2 & & numberOfKids < 10) {}
    remove the first character or no leading zeros
    numberOfKids = numberOfKids;
    // }
    };

    More important answer first: you get two helpfuls and one correct answer per thread. I think that once you give a specific answer a useful, you can't give the same answer. But I don't know.

    First of all, make sure that none of these text fields have a property of vars set.

    Also, you don't need to do it in two steps: revisedValue =-100 * parseInt (numberOfKids.text)

    As you read the value of your textfields of entry by using the text property, you also assign the value of the more dynamic by using the text property. That's what you do, right?

  • Select text in the text box based on user input?

    I need to select (highlight) text that is present in the users choice i.e SystemPrompt from TextArea is shown where the user enters the desired text and if this text is currently present in the text box, put it highlighted, otherwise display additional information. Something like the search feature in the standard Notepad application.

    I can't find what I'm looking for in a TextEditor.

    Text of the text box is available by using the text property.

    If you can access the text typed by the user and then the index can be easily calculated. Something like this (untested):

    QString textAreaText = textArea->text();
    QString userInput = ...;
    
    int startIndex = textAreaText.indexOf(userInput, 0, Qt::CaseInsensitive);
    int endIndex = startIndex + userInput.length();
    
  • Admin Console - requires that the user Admin password and user name valid

    I am running FMIS4.5 on CentOS5.5

    FMIS runs and I can connect via Flash Media Encoder.

    Displays and Web administration console: 1111 gives the xml output, however

    During the use of the user and the password in my xml files to connect (tests with ping), I get the error "user Admin password and valid user name required.

    conf/FMS.ini:

    ###########################################################################

    # fms.ini contains alternative to Flash Media Server variables #.

    # the configuration files. Lines beginning with ' # ' are considered comments.  #

    # A variable substitution is in the form < name > = < value >. All the way to #.

    # the first '=' is considered the substitution variable name and #.

    # everything after the first '=' is considered the substitution value. If #.

    # you want a substitution variable to have beginning or trailing spaces.

    # include double quotes around the value. For example, foo ="bar" #"

    ###########################################################################

    ###############################################################

    # This section contains configurable settings in the Server.xml file #.

    ###############################################################

    # Username admin server

    # For example:

    # SERVER. ADMIN_USERNAME = foo

    #

    SERVER. ADMIN_USERNAME = Admin

    SERVER. $admin_password = str34m1ng

    # Port and Flash Media Admin Server IP address must listen to

    # For example:

    # SERVER. ADMINSERVER_HOSTPORT =: 1111

    #

    SERVER. ADMINSERVER_HOSTPORT =: 1111

    # User Id in which to run the process (Linux only)

    # For example:

    # SERVER. PROCESS_UID = 500

    #

    SERVER. PROCESS_UID = 500

    # GID in which to run the process (Linux only)

    # For example:

    # SERVER. PROCESS_GID = 500

    #

    SERVER. PROCESS_GID = 500

    # Key license for Flash Media Server

    # For example:

    # SERVER. LICENSEINFO = XXXX-XXXX-XXXX-XXXX-XXXX-XXXX

    #

    SERVER. LICENSEINFO = #SORRY YOU DON'T GET TO SEE THIS #.

    # LIVE_DIR is the full path of the sample application 'Live '.

    folder # to store any live streams recorded by the server.

    # For example:

    # LIVE_DIR = \applications\live < FMS_Installation_Dir >

    #

    LIVE_DIR = / opt/adobe/fms/applications/live

    # VOD_COMMON_DIR is the full path to the sample application "VOD".

    folder # to the storage on demand and progressive download of fichiers.flv/.mp3.

    # File stored in this folder can be listened to and are also available PD.

    # Note: If you use the installation default Apache as a Web server.

    # If you change VOD_COMMON_DIR and please change the document root

    # in the httpd.conf file accordingly.

    # For example:

    # VOD_COMMON_DIR = \webroot\vod < FMS_Installation_Dir >

    #

    VOD_COMMON_DIR = / opt/adobe/fms/webroot/vod

    # VOD_DIR is the full path to the sample application "VOD".

    folder # to store only the fichiers.flv/.mp3 on request. Files stored in

    # This file are not PD-able

    # For example:

    # VOD_DIR = \applications\vod\media < FMS_Installation_Dir >

    #

    VOD_DIR = / opt/adobe/fms/applications/vod/media

    # The maximum size of the FLV cache, in megabytes.

    # The default is 500 MB.

    #

    SERVER. FLVCACHE_MAXSIZE = 500

    # To start and stop the server HTTP included throughout

    # with FMS.

    #

    SERVER. HTTPD_ENABLED = true

    ################################################################

    # This section contains configurable settings in Adaptor.xml #.

    ################################################################

    # Application to the virtual host directory

    # For example:

    # VIRTUAL SERVER. APPSDIR = C:\myapps

    #

    VHOST. APPSDIR = / opt/adobe/fms/applications

    VHOST. ALLOW all =

    ####################################################################

    # This section contains configurable settings Application.xml #.

    ####################################################################

    # List of semicolon delimited paths of research for loading script

    # For example:

    # APP. JS_SCRIPTLIBPATH = C:\scripts; C:\Program Files\Foo\scripts

    #

    APP. JS_SCRIPTLIBPATH = / opt/adobe/fms/scriptlib

    ###############################################################

    # This section contains configurable settings in Logger.xml #.

    ###############################################################

    RECORDER. LOGDIR =

    ####################################################################

    # This section contains configurable settings in Users.xml #.

    ####################################################################

    # Enable or disable using HTTP requests to run admin commands.

    # The value "true" to enable, otherwise it will be disabled.  The

    actual orders # allowed for the server admin and admin of the virtual host

    # users can be defined in Users.xml.

    USERS. HTTPCOMMAND_ALLOW = true

    Users.XML:

    < root >

    < UserList >

    <!-this tag defines a server administrator. ->

    < username = ' ${SERVER.» ADMIN_USERNAME} ">"

    <!-salted Hash of the password for the administrator of the virtual server. ->

    < password encrypt = "false" >$ {SERVER. $admin_password} < / password >

    <!-this administration cannot connect to the server of the-> specified

    <!-hosts. This is specified as a comma-delimited list.

    <!-host names or domain names and/or (full or partial) IP->

    <!-addresses. For example,-->

    <!-"foo.yourcompany.com, macromedia.com, 10.60.1.133, 10.60" - >

    <>allow all < / allow >

    <!-this admin is unable to connect to the server from all the...

    <!-specified hosts. This is specified as a list by commas->

    <!-the name of host or domain names and/or IP (full or partial) - >

    <!-addresses. For example,-->

    <!-"foo.yourcompany.com, macromedia.com, 10.60.1.133, 10.60" - >

    < deny > < / nie >

    <!-specifies the order in which evaluate < Allow > and ->

    <!-< Deny > tags. This can be 'Allow, Deny' or 'Deny, Allow '. The - >

    <! - default is 'Deny, Allow', which means that access is allowed - >

    <!-unless specified in < Deny > < Allow > and not.     ->

    < order > allow, deny < / order >

    < / user >

    < user name "janedoe" = >

    < password encrypt = "false" > S4mpl3P4ss < / password >

    allow <>< / allow >

    < deny > < / nie >

    < order > allow, deny < / order >

    < / user >

    < / UserList >

    < AdminServer >

    < HTTPCommands >

    <!-turn on or off using HTTP requests to run admin commands.     ->

    <!-set "true" to enable, otherwise it will be disabled.  The - >

    <! - actual orders allowed for server admin and admin of the virtual host - >

    <!-users can be defined in allow it and deny elements.                                   $

    < activated >$ {USERS. HTTPCOMMAND_ALLOW} < / activate >

    <!-list orders admin server accessible through HTTP.         ->

    <!-add several commands separated by commas.  'All' indicates->

    <!-all orders (it is not recommended to allow orders).          ->

    <!-Separate multiple commands with commas.                              ->

    Ping < Allow > < / allow >

    <!-list of orders admin server refused access via HTTP.                ->

    <!-add several commands separated by commas.  'All' indicates->

    <!-all orders.                                                       ->

    < deny > all < / deny >

    <!-processing order for refuse and allow command lists.  'Deny, allow' - >

    <!--means that the command will be permitted if the order is allow-->

    <!-list or not in the deny list.   'Allow, Deny' means the--> command-line

    <!-will be allowed if it is in the allow list and not in the - >

    <!-list of deny.                                                           ->

    < order > deny, allow < / order >

    < / HTTPCommands >

    < / AdminServer >

    < / root >

    Exit the: admin/1111/ping? auser = Admin & apswd = str34m1ng:

    < result >

    errorof the < level > < / level >

    < code > NetConnection.Connect.Rejected < code >

    < description > Admin user requires valid user name and password. < / description >

    < timestamp > Thursday, May 17, 2012 11:33:43 AM EDT < / timestamp >

    < / result >

    Links do not work for localhost and external connections and the fms_adminConsole.htm (.swf) fails as well.

    Any help is appreciated!

    Hey Jon,

    Please take a look at this. Should help.

    http://forums.Adobe.com/message/4346847#4346847

    Thank you.

  • How to make a text entry for the user to type the name in?

    I do a game in which the user can type in their name, and later in the game, it will say something like:

    "Oh, Kaitlyn, how was your day? But what I really know how to do is make sure the name will be, but NOT all in a sentence in fact. The problem with this is the spacing and punctuation. I tried following a tutorial that gave me this to put in the ActionScript for the output area:

    output_txt. Text = "Hello" + myText + "!";

    Here is the tutorial:

    http://www.danfergusdesign.com/classfiles/oldClasses/VCB331-richMedia1/exercises/inputOutp utText.php

    I think it's because it's for as3 that it doesn't, but I'm kinda new to Flash and it does not seem too difficult. Please give very descriptive instructions.

    What you show will work in AS2 and AS3.  Do you have assigned an instance name textfield (it indicates 'output_txt' in your example)?  Instance names are assigned by selecting the object on the stage and entering the name in the properties panel.

    You must store the name that the user enters in a variable.  This can be done in two different ways.  Do you have something in place for that?

  • Quote from validation in the text entry box

    Hi all

    I want to validate content beginning and ending with the stock symbol in the text entry box, the user must type it just quotes ("'") in the input text box. So I need to validate the content of the user with quotes

    For example. Let take text1 is my filed input text. And my answer is "Adobe"(quote response also includes").

    If I like it

    Text1.text = "«Adobe"»

    Error occurs

    Can someone suggest me to do.

    Thank you


    Escape the quotes:

    Text1.text = '\"Adobe\'";"."

  • Slide auto is using of multiple text entry boxes once the user enters two of the six answers

    I have several areas set up on a slide text entry.  The user must enter the answer in each text box.  And even though I have properties of all TEB "break from legends of success or failure", auto slide advance once the user enters only two of the six responses.  I thought that perhaps insert a click box and setting ' to pause until the user clicks on "would resolve the issue... but it is not.  Here's a screenshot of what my slide looks like and a screenshot of the properties that I set myself for each TEB.  Can someone help me please?  I need all six TEB to complete before moving to the next slide.

    TEBs.PNG

    TEB properties 1.PNG

    TEB properties 2.PNG

    The most important screenshot is missing: chronology. Where are the pausings for the TEB?

    You can start by changing the Actions on the success and the last attempt: they are both set to Continue, which means the playhead will be published immediately after a good response and after exhausting attempts in case of wrong answers. Set them to any Action.

    No Submit button? Only shortcut key entry for each TEB?

  • Captivate: Keep the cursor in the text entry box

    I would limit the cursor on the input text in a slide area, regardless of where the user can click.

    I am doing a project of training for an application interface text, and I simulate the application entry field by placing a unique text on the slide entry box.  Although the cursor starts in this field when the slide is displayed, if the user can use the mouse to click anywhere but the text entry box, the cursor disappears and the user can enter data until he or she clicks on the text with the mouse input box.  This problem occurs in both the preview and the. Output of the EXE.

    I tried to activate and deactivate the 'click' option under select key... in the parameters text box properties.  I also tried setting the action on the lost update to allow for the text control, or make her display a legend that says "click in the area of selection."  Apparently, remove the cursor of the box isn't enough to trigger the event "has lost the Focus.

    While this isn't a complete show-stopper, it is an irritation that I'd rather not have my users deal with.

    I am using Captivate 4 v4.0.1 build 1658.

    Thanks for any help you can give...

    Hello

    I was able to do the following.

    Insert a box click programmed object to go to the last slide when you click it.

    Insert a text entry box and configure it so that it does not keep the text.

    Insert a blank slide just before the slide with the TEB, then once it is longs.1 seconds. You should also give the same origin as the slide with the TEB. Otherwise, you will see a 'flash', as the previous slide is visited.

    The way this works is that the user clicks anywhere but the BER and transport action click on box to the previous slide. But this slide is really super short. .1 second if it is visited and the read head again enters the slide with the TEB.

    One thing to be aware of, is that if you plan to view the Captivate 'as a whole', which means that you have no idea what browser is used to view it, you must consider the insertion of a button object on the first slide that requires the user to click on it. This way is is moved to the Flash sitting inside the browser object.

    See you soon... Rick

    Useful and practical links

    Captivate wish form/Bug report form

    Certified Adobe Captivate training

    SorcerStone blog

    Captivate eBooks

  • How to validate the number of characters in the text entry box?

    Hello

    I have inserted a text box entry and assigned a variable (UserName). Now, I need to limit the entry of a number, maxinum of 20 characters. In other words, how can I validate the number of characters in the text entry area and provide feedback if it is more than 20 characters?

    I think that you should study the Jim Leichliter widget that allows you to use regular Expressions to validate text input.

  • text entry boxes

    Hi all
    I don't know what I'd do without the forum, thank you in advance for your help!
    I am doing a demo to enter a password that is displayed on the screen as asterisks. Is it possible to implement the text input box so that no matter what is typed asterisks will appear?
    Let me know if you need more information.
    Thank you
    Peter

    Hi Peter

    Absolutely! Simply double-click on the object of the text entry box and examine its properties. Click the Options tab and look down. You should see a check box labeled "Password". When selected, any character typed in the field is reflected back to your username as an asterisk, as a traditional password field would behave!

    See you soon... Rick

  • AF:table value of text entry box does not get stored in the database.

    Hello
    I use af:table in my jsff page. The table contains the column of text entry box. After clicking the Create (+) button, a line has been added to the table. I got value into the text entry field and click the 'OK' button to commit the transaction. When I check the database, the entered value is not stored in the database. What I've observed, it's that if I have more than 1 table in the af: table and after entering the value into the text entry field, if I tab out and control moves to the next line, and then click the OK"" button. This time, the value you entered get stored in the database. It's look like, the value of current row is not updated until the action tab. Please help me solve this problem.

    JDeveloper version: 11.1.1.6

    Kind regards
    Suresh

    Hello

    What is the business service associated to this? Also the OK button have no immediate = true set

    Frank

  • How to capture user input and display it in another text field

    Hey there,

    I create a simple screen that allows a user to enter text and I want to take what they get and appear in other fields of text on the same screen, so they do not have to retype. I'm using AS3. I read an article that gave me a few tips, but the code I use is not doing the job. I'm pretty new to Flash, so any help would be appreciated.

    Here is what I use:

    var Description: String;


    myText_txt.addEventListener (Event.ENTER_FRAME, assignText);


    function assignText(myevent:Event):void {}
    Description = myText_txt.text;
    }

    textResults_txt.text = Description;

    My thoughts after reading the article (I think it's from Ned) should follow the first text field, myText_txt and assign this text to the variable Description. Then I tried to assign the variable Description to another field of text called textResults_txt. However, when I type in the first text field, nothing appears in the second.

    Any ideas? Am I using the wrong method to monitor the text box?

    Thank you for your time.

    Stephen

    You don't want to lose an ENTER_FRAME for this.  You must assign an event listener for the input textfield that listens to a CHANGE event.  The event handler for this listener function will simply match the textfield in the first second.

    myText_txt.addEventListener (Event.CHANGE, assignText);

    function assignText(evt:Event):void {}
    textResults_txt.text = myText_txt.text;
    }

  • Captivate 9 - text entry area - cannot navigate through the input of text boxes on the same slide using enter key (works only tab)

    I designed a slide that has 3 areas of text entry.

    I need the user to be able to type in their response to the first box and then press the ENTER key, it will pass them in the next text box. After typing in their response to the second box, press ENTER, and then have developed pass to the third area.

    I don't want to use tab, I want to go to work as a shortcut key, so this works well on all devices. It feels like a trip to the logic of the user.

    I removed the button SUBMIT and check the validate user input.

    I put the shortcut key to ENTER in propriety / Actions area

    However, after that type in an answer and pressing on enter, the focus is not moved in the input text box available at the following address on the same blade.

    This happens regardless of browser (tested Firefox, Chrome, Safari, and IE9/10) and also OS - Windows 7, Mac OSX 10.9, 10.10 and latest version of iOS

    Only the tab key works (Ive even tried with other keyboard shortcuts and it always comes back to TAB).

    I know that this feature is possible in Captivate 9. I have read and watched many tutorials online, it seems a very basic feature. I could be wrong.

    This is a feature of wholesale/known or I'm doing something wrong.

    If a bug, is there a plan to fix it soon?

    Indeed, your problem is related to the Enter key as a shortcut key, not to have multiple TEB and one absolutely validation button. Take a look at this article very old (you are not the first to ask about this):

    A submit button for multiple text entry boxes? -Captivate Blog

    But here I explained to indicate to the user click in a next TEB, do not use input.

  • Text input does not pause for user input

    If all goes well, a simple question:

    Brief:
    I have a box of text on a page of simulation of connection that do not pause for user input. Instead, it just displays as if writing be typed and then continues.

    Question:
    How do I get this thing to pause and wait for the user to enter the login id?

    Detail:
    Version 1.01.1418 (full version), platform PC of Captivate
    Text entry box
    1 entry correct listed: "sa".
    Success = continue
    Display: Rest of slide
    Break after: 0.1 sec (varied this having any impact on a break for the entry)
    No transition

    DRM for advice.

    This must have been a dark note somewhere in the documentation:

    You can not interact with the page if preview you with play this slide (F3). The other preview modes to the text entry area work correctly.

  • How can I disable the graphic legend to the user text entry?

    Dear friends!

    I need your help in the following case.

    My front panel has a chart whose legend path is visible. I have display programmatically inside the runtime text, according to the article that the user selects in a control of the ring. The problem is that the user can also enter text (running) in the same area. Is there a way to prevent the user to text entry in the legend tracing running text box? I need the chart and the legend of tracing enabled at run time. Please suggest solutions.

    Thank you very much!

    Have a nice day!

    Try to put a picture control on the top of the chart legend and when the user tries to click on the name of plot, it avoids text entry

    You may also toggle the visible property of the image control to allow text in admin mode

Maybe you are looking for