How do I set a form field to accept whole numbers only?

I am using Acrobat X.
I have a number of fields in a form that are used in a variety of calculations. It is the nature of these fields that they need to contain whole numbers only, no decimals.
On the "Format" tab, I have set the field format to "Number" and the number of decimal places to "0"
On the "Validate" Tab I have set the "Field Value is in Range" "From 0", "To 999"
This is to ensure that the field can only contain a maximum of a three digit number.
But this still allows the user to enter decimal places. This messes up my calculations so I want to limit the user's input to whole numbers.
How do I do that?
Thanks!
Steve

I apologize for being dense but I really do not know how to apply your solution. Taking the path you suggested there is nothing under Tools>Document Processing relating to Java scripts.
I presume that I have to save this part somewhere in Acrobat:
// Document-level function
function triDigKS() {
    // Get all that is currently in the field
    var val = AFMergeChange(event);
    // Reject entry if anythig but digits
    event.rc = AFExactMatch(/\d{0,3}/, val);
And then use the call out:
// Custom Keystroke script
triDigKS();
Somewhere else but I don't know where thos two places are. Do I use the callout in the validation tab, or somewhere else?
Thanks
Steve

Similar Messages

  • How to set a form field focus

    Is there a simple way to set a form field focus... so basically on load the field focus is set to a specific field?  I know how to write it in javascript but was wondering if there is a simple way to basically select the field and click a button or two and get the same result?  thanks.

    The script for that is extremely small and very simple.
    In all hosety, it would probably take longer to edit it through the DW interface than by hand.
    Add this after your form and change the bold areas to the name of the form and the name of the input you want to have focus on...
    <script type="text/javascript" language="JavaScript">
    document.forms['myform'].elements['mytextfield'].focus();
    </script>
    Those two things are the only items that will ever change.

  • How can i set a form to read only when a checkbox it checked?

    How can i set a form to read only when a checkbox it checked?

    Hi,
    If you search the forums for Paul's example LockAllFields. This contains a function in a script object that you can call from the click event of the checkbox.
    Re: Saving Fillable Form as non-fillable PDF
    Good luck,
    Niall
    Assure Dynamics

  • How Can I Set the Search Field in iTunes?

    In applescript...
    In another app - I have copied a song title to the clipboard...
    Q: Now - How Can I Set the Search Field in iTunes to the clipboard contents?
    Q: Also how can I also open the main library itunes window?

    Hi Rev Dave,
    Q: Now - How Can I Set the Search Field in iTunes to
    the clipboard contents?
    Unfortunately the only way I can think to achieve this involves the use of "UI Scripting". The other previous posters have given you the preferred method you should consider using. If you want to script iTunes so that you visually see the search take place in iTunes you'll need to use the method shown in the script I've posted below.
    Q: Also how can I also open the main library itunes
    window?
    Cyclosaurus has given you the answer to this part of your question already.
    Here is a script that (though ugly IMHO) should achieve what you are asking for:set theSearch to (the clipboard) as string
    tell application "iTunes"
    activate
    set allPlaylists to playlists
    repeat with aList in allPlaylists
    if name of aList is not "Library" then
    set view of front browser window to aList
    exit repeat
    end if
    end repeat
    set LibList to playlist "Library"
    set view of front browser window to LibList
    end tell
    tell application "System Events"
    tell process "iTunes"
    if "iTunes" is not in name of windows or ¬
    focused of window "iTunes" is false then ¬
    keystroke "1" using command down
    keystroke tab
    keystroke theSearch
    end tell
    end tellIn order for the above script to work you need to have "Enable access for assistive devices" enabled in the "Universal Access" section of the "System Preferences" application.
    If you have any further questions about the above script feel free to ask.
    Hope this helps...
    iBook G4 1GHz   Mac OS X (10.4.3)   640 MB RAM

  • How we create dynamic add form field in web form

    How we create dynamic add form field in web form?

    Hi,
    Thanks for reply.
    I need to create a form in which "add more" input field dynamically. For
    example sometime we need field on or more. Please look at the demo, I need
    to create form as per demo in business catalyst:
    http://www.openjs.com/scripts/examples/addfield.php

  • HT5552 how do I set up paypal as my accepted payment?

    how do I set up paypal as my accepted payment? I have been told thru customer support that it is an acceptable form of payment but they make it very hard to do so.

    If you don't see the PayPal button as a payment method, then you're probably not in the US which, to the best of my knowledge, is still the only country where PayPal is an accepted method of payment for the iTunes Store.
    Regards.

  • How can I set firefox as default browser in citrix server, only for few groups. does -silent -setdefaultbrowser option working in latest version?

    How can I set firefox as default browser in citrix server, only for few groups. does -silent -setdefaultbrowser option working in latest version?

    I think so: [http://discussions.citrix.com/topic/330585-firefox-default-browser-for-all-users/]
    Can you also set the default programs in the Group Policy User Settings?
    Reference: [http://community.spiceworks.com/topic/884740-default-user-profile-in-citrix-environment]

  • How do I set the wallpaper for the the first page only

    how do I set the wallpaper for the the first page only.I have my ICE #'s as wallpaper but I only want it on the first page

    When you set a wallaper you are asked where you want to set it. Either Lock Screen or Home Screen or Both.
    If you choose Lock screen it will only appear when you wake up your phone.
    If you set it to Home screen, then it wil be set behind the app icons on all your home screens.
    If you choose both, then it will be on both.
    Not sure what you mean by the " have a photo of my ICE in contacts that I am trying to use????" 
    The Photo should be in the Photos App. how is it in contacts?  is it assigned to a contact?

  • How do I set up an existing Apple ID as free only?

    I have created an Apple ID for my daughter to use on her Ipod.  I don't want her to have the option to have an option to purchase items.  When we go to install free apps it wants credit card information.  How do I set up an existing Apple ID as free only?

    Contact iTunes ansd see if they can help
    Contact iTunes

  • How do I use one form field to enter data into another form field?

    Does anyone know how I can code a form so that when I select
    a name in one drop-down form field, I can ensure that the person's
    e-mail address will appear in another text field?
    Thanks.

    Thanks Roel,
    I remember that I tried to define multiple DML. but it did not work for Apex gets confused.... which items belongs to which table...
    instead-of-triggers (to process the inserts/updates/deletes) Can you pls, elaborate more on this solution ... ?
    Regards,
    Fateh..

  • How do I cause a form field to raise its blur event?

    I have a web form that displays an editable pdf document.  When a user clicks a button the form will get validated.  If one of the fields being validated has the focus its value will not get updated when I need to do the validation.  For example, if I am validating the First Name field and I type text in it and then click on a button (from the web) to cause validation, the document says the field is invalid because there is no data.  If I hit tab on the field to focus a new field the validation works fine.  How can I cause the field to get updated?  I have tried to create an empty form field and focus to that first but that does not work.

    Nope, I have a button on the website that the user clicks to send a validation request.

  • In Adobe Acrobat XI Pro, how do I validate a form field so that it's numerical value is less than or

    I have one numerical field named "B," and I need to validate it so that it is less than or equal to the value of another field named "A." I can't figure out how to do that!

    OK, so the custom calculate script for field B could be something like:
    (function () {
        // Get field values as strings
        var sA = getField("A").valueAsString;
        var sC = getField("C").valueAsString;
        var sD = getField("D").valueAsString;
        // Only perform the calculation if all fields are filled
        if (sA && sC && sD) {
            var sum = +sC + sD;
            event.value = sum;
            // Alert the user if the sum is more than A
            if (sum > +sA) {
                app.alert("Error message goes here");
        } else {
            // Blank this field if all fields are not filled in
            event.value = "";
    Instead of (or in addition to) an app.alert popup, you could place this message in a read-only form field, and clear it if there is no error condition.

  • How do I create a form field?

    How do I create a SSN field in my form that is mask?  example: once the user enters the information it will look like this:  SSN *********
    Thanks for any help!!

    After filling out the form, hit the submit button, the next form pops up showing the person it will go back too, hit send then the "Save As" Box pops up and at that time the SSN field goes blank. See attached. This is driving me crazy, what am I doing wrong?? Thanks for your help.

  • How do I lock some form fields, but not all?

    How do I create a form with interactive form fields where certain fields can be locked after being filled in, and others remain unlocked so the customer can interact with it?
    My workflow looks like this:
    I created a PDF with open form fields for my client to distribute to their salesmen.
    Salesmen receive a call, fill in the information gathered. (name, address, services, price quotes, etc)
    Salesmen email the pdf form to the customer. All fields that they filled in now need to be non-editable, EXCEPT an "I agree" checkbox and a signature line.
    Help is greatly appreciated!
    Michael

    Hi Michael,
    Before I go too deep into a suggestion, I need to know if you are using electronic digital signatures for signing the document? Or, are you expecting the customer to print the document, sign it with a pen and fax it back? The reason I ask is you could use digital signatures to lock specific parts of the document, but if you're not using them I won't bore you with the details.
    Thanks,
    Steve

  • How do i override a form field that is part of a calculation?

    I have a form that has several calculations. One field in particularlar calculates a minimum down payment based on the total price. How can i get that field to accept either the calculated amount or be over ridden with a greater amount for the down payment?

    Are you creating this form?
    If so then you will have to create a custom calculation script.

Maybe you are looking for

  • Flash CS4 onPeerConnect does not fire

    Hi I tryed to do Flex example for simple chat (p2p) with Stratus at Flash CS4 IDE (adapted it of course) but onPeerConnect does not fire. Can you take a look at my code ? What's wrong with it ? package {     import flash.events.*;     import flash.ne

  • Casting a org.w3c.dom Node to a org.dom4j Node

    Does anybody know how I can cast (convert) a w3c.dom Node to a dom4j Node? If I just trying casting the w3c node "(org.dom4j.Node)" it throws an exception...

  • The version of iOS on does not match any of the versions of iOS supported for development with this installation of the iOS SDK

    Getting this error message as of this morning: The version of iOS on "iPad" does not match any of the versions of iOS supported for development with this installation of the iOS SDK. Please restore the device to a version of the OS listed below, or u

  • SAX parser retrieve attribute

    Hi, I am parsing using the SAX Parser. In the XML excerpt below, how do I retrieve the "POL", "SUM" or "EUR" values? If I use a contenthandler and I can extract the SubjectCode, Subject, and SubjectQualifier element names, but not the data contained

  • Hard shut down causing restart error

    A prompt to do a software update froze my MacBook. Force quit didn't help, so I did a hard shut down. Now, the machine will power on, but as soon as I hear the startup tone, a black screen drops down with the following message: "You need to restart y