Prevent User From Entering Characters In A TextField

Does anyone know how to prevent certain kinds of letters or symbols from being entered into a textfield? Something that prevents the user from typing a minus sign or the letter Q.

You can also use KeyListener. You can also search the forum as this question has been asked numerous times.

Similar Messages

  • How to prevent a user from entering characters into a number field

    How do you prevent a user from entering characters like A or B into a field that is defined as a numeric field?
    Please note that
    - we use block validation (for other reasons)
    - we are not able to convert these numeric fields to character fields
    We want to avoid a user being hasseled with the FRM-40209 ... message.
    This message is
    - not very helpfull because it does not inform us what the problem field is
    - not suppressable
    Any hints ?

    I went back to the drawing board on this one.
    You are absolutely right : the message can be catched !
    By writing an on-error trigger you can check for the error number. Sadly enough my first attempt on this used the on-message trigger which never fired hence my desperation.
    Anyway, the on-error trigger in combination with :SYSTEM.CURRENT_ITEM or :SYSTEM.TRIGGER_ITEM enables me to display a more meaningfull message to my users.
    Thanks for the hint.

  • How to prevent users from entering '+' or '0' in front of country code in the phone number field?

    Requirement:
    How can I prevent guest users from entering '+' sign or '0' in front of country-code in the visitor phone number field during self registration?
    Few SMS service providers are not looking for '+' sign or '0' or '00' in front of the international phone numbers to trigger the sms. Providing these values in front of country code during self-registration may fail to deliver the sms to recipient.
    Solution:
    Using a simple regular expression, you can validate the entered phone number during the guest registration. 
    The below regular expression will help you to validate the phone number and allows to register only  when the phone number is not staring with '+' or '0'. 
    ^[1-9][0-9](\d{7}|\d{8}|\d{9}|\d{10}|\d{11}|\d{12})$
    It also performs the below validations.
    only numbers are allowed.
    first digit of the entered phone number should be 1 to 9, so '+' or '0' is not allowed. 
    numbers from 0 to 9 are allowed from the second digit.
    also validates phone number length, the length of the phone number should be 9 to 14.
    Configuration:
    To add the above regex in the visitor_phone number filed, please navigate to ClearPass Guest >> Configuration >> (Pages)Guest Self-Registration >> select the self-registration page and go to Edit >> Register Page >> Form >>  select the filed visitor_phone and set the Validator to " ISRegexMatch" and enter the above regex in the Validator Argument filed as shown below.
    Note:  Edit the Validation Error as per your requirement.
    Verification
    Adding the given regex will validate the phone number and prevent the guest user from registering the phone number starts with '+' or '0'.
    Please find below the sample outputs for your reference.
    Result when phone number starts with '+' or '0'.
    Successful registration.

    Is this a Mac Preview issue?

  • How to prevent user from entering zero hours in Timecard

    We have a need to prevent user to enter/submit zero hours in timecard. The case right now is user will be able to enter:
    Hours Type M T W T F
    Vacation 0 8 0 0 0'
    and when we run BEE transfer process it created absences with zero hour duration for Monday, Wednesday, Thursday and Friday.
    We try to prevent absences to be created with zero hours or user to be able to enter zero hours in timecard.
    Please help.
    Thanks

    Hi
    you can refer following example
    ========= formula ===============
    Initialise Variables which can be null
    default for db_pre_period_start is ' '
    default for db_pre_period_end is ' '
    default for db_post_period_start is ' '
    default for db_post_period_end is ' '
    default for db_ref_period_start is ' '
    default for db_ref_period_end is ' '
    READ IN INPUT VARIABLES
    INPUTS ARE resource_id (number)
    , submission_date (text)
    , period (number)
    , period_maximum (number)
    , reference_period (number)
    , db_pre_period_start (text)
    , db_pre_period_end (text)
    , db_post_period_start (text)
    , db_post_period_end (text)
    , db_ref_period_start (text)
    , db_ref_period_end (text)
    , duration_in_days (number)
    , timecard_hrs (number)
    Processing
    l_return = otl_24_hours_check()
    IF l_return > 0 THEN
         ( rule_status = 'E'
         message1 = 'DAILY_MAX_LIMIT' )
    RETURN VARIABLE
    RETURN rule_status, message1
    ============= database package ==============
    FUNCTION otl_24_hours_check
    RETURN NUMBER IS
    j NUMBER := 0;
    e_count NUMBER := 0;
    tc_blocks Hxc_Self_Service_Time_Deposit.timecard_info;
    BEGIN
    tc_blocks := Hxc_Self_Service_Time_Deposit.get_building_blocks;
    j := tc_blocks.FIRST;
    WHILE j IS NOT NULL
    LOOP
    BEGIN
    IF tc_blocks(j).scope = 'DETAIL' THEN
    IF to_number(tc_blocks(j).measure) > 24 then
    e_count := e_count + 1;
    END IF;
    END IF;
    j := tc_blocks.NEXT(j);
    END;
    END LOOP;
    RETURN e_count;
    END;
    ================================
    above formula checks if a person entered more than 24 hours in a day

  • Prevent user from entering info in a JTextField

    I have implemented a calculator in a GUI.
    At the moment it works but the user can enter text in the answer JTextField.
    I want the answer to appear in a JTextField (background to appear grey) when a Jbutton 'equals' is pressed but I want to prevent the user from being able to enter anything in this field, so that it is only an output field. Is there a special way to disable input from JTextFields?
    Thanks in advance!

    Is there a special way to
    disable input from JTextFields?Take a look at:
    setEditable(false); and
    setEnabled(false);
    /Kaj

  • [SOLVED] Faces - Preventing user from entering URL manually

    Hello,
    I know somewhere in this forum is thread about this issue but I'm not able to find it.
    I want to redirect or forward user to start page when he/she enters URL manually.
    Any ideas?
    Rado

    Hi,
    You can tell whether a request is from the browser URL or JSF by the access method: POST or GET
    The following doFilter() method is from a ServletFilter you can add to teh Faces Servlet in e.g. SRDemo
    public void doFilter(ServletRequest request, ServletResponse response,
    FilterChain chain) throws IOException, ServletException {
    if (((HttpServletRequest)request).getMethod().equalsIgnoreCase("GET") &&
    !((HttpServletRequest)request).getRequestURL().toString().endsWith("SRWelcome.jspx")){
    _filterConfig.getServletContext().log("User "+((HttpServletRequest)request).getRemoteUser() +" doesn't play by the rules !");
    chain.doFilter(request, response);
    It checks for the access method and if it is GET and the accessed page is not SRWelcome then it logs the username to the application log. (You may want to do someting different here).
    The problem is however that you application (JSF) should not use "redirect" on its navigation case because this also sends a GET request.
    This filter works fine but would fail if e.g. you need to have fine grained authorization based on URL patterns. In this case, the patterns need to be added to the exclusion list because J2EE security requires you to redirect a request to be effective.
    Frank

  • How can we prevent a user from entering a value in Parameter Field?

    how can we prevent a user from entering a value in Parameter Field and Select-options Field?

    make it invisible, make it inactive, make it display only.
    if the field is not there or not to be seen the user WILL have problems inputting data.
    BUT once the field is there you can NOT prevent that the user fills it with data.
    all you can do is on PAI check if the data the user inputted was good or bad, and clear his inputs, but you can NOT prevent him inputting something.

  • Why am I receiving a notice to update my version and then not able to click on it? It also prevents me from entering the internet if I put my computer to sleep with this update box there!

    The box appears after I'm on the internet. It's on my desktop when I go to shut down my computer and after I've shut down the internet. When I click on the x it doesn't disappear. When I click on the box indicating Yes, I'd like to update my version of Firefox it does nothing. If I leave this box there and put my computer to sleep it stays on and actually prevents me from entering the internet! I need to restart my computer or shut down! My computer is a MacBook Pro and is only one year old .

    They have to know who the person is who has their account set up wrong?   Do you know who they are or how to identify them?
    if not, how do you expect Verizon to find which user that is?
    Best thing for you to do is set up a mail filter and just throw those into the trash or delete them the second they come into your email box. 
    here are a couple walk throughs. 
    How to Filter Mail from a Certain Sender Easily in Win Live Mail, Outlook Expr.

  • How to prevent user from "normal" navigation?

    Hi everyone,
    I have a PDF with a lot of pages, which are connect through Links (It's an export from MS Visio).
    I now want all the users to keep navigating through the links and prevent accidental navigation through the "normal" way (Arrow-Keys, Mouse-Scroll, etcs...) as much as possible.
    For this I have three ideas:
    "Force" Fullscreenmode: Here I can prevent from advancing in pages by clickAdvances=false. However I think it's not possible to prevent page changes by mouse-scroll or key-press.
    Using Layers: I have read, that it is possible to show/hide layers on demand with js. But I don't know how this can be done. And I would have to change the links to js-function showing the needed layer...
    Loading/Deleting Pages: I could load and delete Pages on demand. This is probably slow and i would need two pdf files.
    Does anyone knows something that could help me to solve this problem?
    Cheers, Holger.

    1. Not possible (except if the additional method described below is used).
    2. This is possible, but it requires setting up the layers and then a system of buttons and scripts to show/hide them.
    3. Also possible, but much more complicated than using layers.
    Another option is to use a script to prevent the user from entering a page, unless its done via a button.
    However, all of these methods have their disadvantages and can be very annoying for the users. You should really think if you want to implement this feature...

  • Prevent user from selecting quiz answer

    I'm using CP5 and my project is predominantly quiz questions.  Each question allows infinite attempts and uses advanced answer options to 'show' audio feedback for all answers submitted (wrong and correct).
    Also, each quiz has an audio introduction.
    When a user enters a quiz slide, the audio intro plays, but the user is able to submit an answer. If they do this, the audio feedback for the question plays at the same time as the introduction audio. Similarly, if the user submits a wrong answer, then quickly submits another answer, the 2 feedback audios play concurrently.
    So, things are working as I expect them to, but it's not ideal and is a little sloppy if a user doesn't wait for audio to stop before doing their thing.
    Is there a way to prevent users from submitting answers while either the intro to the slide is playing or while another answer feedback is playing?
    I haven't been able to figure out how to do this with advanced actions.
    I also considered putting invisible, dead buttons or captions over the answers that would block a user's click until the audio is done, but there's no way that I know to put anything in front of a quiz object.
    Thanks in advance!

    Hi Guido,
    please state your specific question in the posting as well, as after quickly reading it I had to stop and read a second time to really get the meaning of it.
    So you want to know how you can prevent change of selection in certain cases:
    For simple validation a client-side javascript would be easy, this way you can even prevent the submit-event from being fired.
    For more complex validation you need the server, right. But I would not use the iterator method for this.
    The "best" place for input validation would be do_handle_data, which is executed before do_handle_event, where you can react on the incoming row-selection-event and the validation result.
    Regards,
    Max

  • How to prevent users from running PRC: Transaction Import from WebADI form?

    Hi,
    We are 12.1.3 and trying to create a workflow to approve Project transactions coming through web ADI before they become effective. To this end, we want to prevent users from running the PRC: Transaction Import from the Web ADI.
    I know that if the checkbox Automatically run transaction import is not checked, the program does not run. But we want to hide this checkbox and not allow the possibility that the program could get triggered.
    To this end, we updated the BNE_INTEGRATORS_B with source='C'. This allows you to edit the integrator from Desktop Integration Manager.
    UPDATE BNE_INTEGRATORS_B SET SOURCE ='C' WHERE  INTEGRATOR_CODE ='PAXTTRXB'
    In the 4th step, where the value for Uploader Parameters is set, we have set boolean value to No. These are the fields on the page:
    Parameter Name: bne:import
    Display Name: Start Transaction Upload
    Data Type: Boolean
    Category: Field
    Default Value: Boolean Flag: No
    Description: start Transaction Import Concurrent Request
    Display Options: Displayed: Unchecked
    Display Options: Enabled: Checked
    Display Options: Required: Checked
    Prompt Left: Automatically submit Transaction import
    Display Type: Check Box
    Maximun Size: 100
    Display Size:100
    Now the checkbox is not appearing for the user to check it, But the program is automatically running when you hit Upload in the WebADI. 

    Hi ,
    Try removing the PRC: Transaction Import Program from the request group for the responsibility used by customers to submit the WebADI and then check if the program launches.
    Regards,
    Raghavan

  • Hi All, We are in to Release 11.5.10.2.There is a specific requirement to Prevent users from creating Manual Sales Orders in oracle and yet users should be able to book the Sales Orders Imported from CRM system into Orcale.Please advise.

    Hi All, We are in to Release 11.5.10.2.There is a specific requirement to Prevent users from creating Manual Sales Orders in Oracle and  yet users should be able to book the Sales Orders Imported from CRM system into Orcale.Please advise.

    Thanks for your advise.
    However, I missed to mention that we have two set of users  One is for Finished Goods and another for Spares.
    Only Spares users need to be prevented from creating Direct/Manual Sales Orders in Oracle.
    As you suggested, if this will be done at Form level, that may Disallow FG users also to create Manula Sales Orders which should not be the case.
    Further, I tried to test one scenario through Processing Constraints but it did not work.
    Application
    OM
    Validation Type
    Entity
    Temp
    Short Name
    TBL
    Validation Semantics
    Created By
    Equal To
    User(Myself)
    Processing Cosntraint
    Application
    OM
    Entity
    Order Header
    Constraint
    Operation
    User Action
    Create
    Not Allowed
    Conditions
    Group
    Scope
    Validation Entity
    Record Set
    Validation Template
    101
    Any
    Order Header
    Order
    Above Created
    Please advise.

  • How do I prevent users from being able to update Firmware

    I have several users (14) with iPad 2 and they rely on an in-house developed App. we have yet to test this App on iOS 5.1 and therefore want to avoid any of the users updating the iPads at all cost!
    this question is in two parts:
    How can I prevent users from upgrading firmware themselves short of just asking nicely?
    How can I stop the iPad from automatically downloading the Upgrade when I deploy a Policy using the iPhone Configuration Utility?
    Any advice would be great!

    We've been looking at the AirWatch mdm and have been told it has this capability.  Not sure if it would be justified from an economic standpoint for you, however. 

  • Is there any way to prevent users from ship confirming on a particular date?

    Hello All,
    We have a requirement to prevent users from ship confirming on a particular date. This is due to they are performing Annual Physical Inventory.
    Is it possible to restrict users performing shipping transactions on this particular date?
    I have tried adding exception to the existing Calendar set at org level and there is no customer specific Calendar defined, however it is still allowing me to perform ship confirm.
    Please let me know if you have any suggestion on this requirement.
    Thanks

    Hi,
    Yes is Possible.
    You can add An Exception in Your Shipping Calender.
    So when Some one tries to ship an Order on that date Oracle will automatically select Next possible date.
    Thanks
    Shameer

  • How to avoid user from entering new price condition in return order

    Dear Expert
    We are facing a scenario where we make return order; the Price is copied from the invoice. And it is working perfectly. The system does not allow us to change the price.
    The issue we are facing here is that user can input new condition like discount /premium and change the net value for the return order pricing, and this will reflect in the credit note for returns.
    Is there a way to restrict the user from entering any pricing condition in the header or item conditions tab.
    although we cannot change the original price coming from invoice referenced for return order, but the user can input new price conditions as below. This must not be allowed.
    The price must come according to the Qty being referenced.
    While making the credit for returns, the user has a chance of further making changes to the net value by adding new conditions. Hence this must also be restricted for any changes.
    Thanks
    Edited by: Lakshmipathi on Jan 31, 2012 6:55 PM
    Thread Locked - Reason Cross Post

    okie .... i will tell briefly what is the problem ....
    Take a scenario wherein a user has logged into my application and he is performing a task which will put his user id and his employee id into the session. Then he opens another window by using either ctrl+n or through files->new window.
    So now a new browser will open but the session will be same ..... in this newly opened browser, user performs some operation which will remove the user id and employee id from the session .... Now if he again comes back to the first window and tries to do some operation, then a null pointer exception will be thrown saying that the employee id is null .... because he has deleted that in the newly created browser ..... to avoid this situation what can we do ???? can you please help me in this regard ??? you got my problem right !!!

Maybe you are looking for