Try to retrieve the contents of a text field and use it in a conditional statement

Hello world

I have a form with a text field and a button. The text field is called "orderNo" and the button is called "genOrder".

Initially, the text field is empty, and clicking on the button fills the text with an appropriate order number field.

I have need to check the text field for the data (content) before you write the order number, in this way, if an order number is already present in the text field, it will be over written.

My intention is to use an if / else structure to perform the tests, but I do not know how to retrieve the content of the text field (if the content is present!).

If anyone can suggest how I can go about extracting the contents of a text field and then use it in an if / else statement it will be greatly appreciated.

Kind regards

DAVO

currentOrderNo = this.getField("orderNo").value;

If ("currentOrderNo == null | currentOrderNo ==" ") {}

the field is empty, fill it with a new value

} else {}

the field is not empty, something else

}

Tags: Acrobat

Similar Questions

  • HELP - lost the button "calculate" in the "text field properties"! I try to summarize the total for separate text fields in a summary box.

    Help, please!  I try to summarize the total for separate text fields in a summary box, but have lost the tab 'calculate' in the 'text field properties area.  Any help would be greatly appreciated!

    When in forms editing mode (Tools > prepare form), select: more > return to the Acrobat form

    In the future, check the box 'this document requires signatures' when you choose at the beginning: Tools > form prepare

    unless you plan to use the form with eSign Document Adobe cloud service.

  • Try to highlight the rectangle of a text field

    I'm trying to point out the rectangle of a text field with an Annotation of the line, but I'm a bit confused.

    The first doubt is on the 'Square' vs 'Rectangle' annotations What is the difference between them? Adobe has those changed recently?

    I tried several variations of the following code snippet:

    var x 1 = textField.rect [0];
    var y1 =
    textField.rect [1];
    var x 2 =
    textField.rect [2];
    var y2 =
    textField.rect [3];

    var this.addAnnot({) = underline
    page: 0.
    type: 'Line ',.
    Rect: [x 1, y1, x 2, y1],.
    strokeColor: color.red,.
    strokeWidth: 160
    });

    What I get is a line of identity (e.g., 45 degrees) in the lower left corner.

    -Ramon

    The square rect sets top-left-x, top-left-y, down, left - bottom-left-y and x.

    For a line, it is left-x, left-y, x-right, right-y.

    So if you want the line to be under place, use the background values of the place to place the line.

  • How to drive the content of a text field or table from a drop-down list selection cell?

    Users will choose an option in a menu drop-down. I want their selection to control the contents of the cells in a table or text elsewhere on the form fields.

    For example, 'The coldest season of the year' by selecting 'winter' in the menu drop-down displays in a table cell.

    Thanks in advance for the help.

    Nick

    Hi Nick,

    Here are some examples:

    https://Acrobat.com/#d=pxtis4z3OxCqWxajZwDS2Q

    https://Acrobat.com/#d=20lQl9JfL19aBtbPC1WYbw

    https://Acrobat.com/#d=Hi0ZwVgVB1PWbxc6OJ0z4A

    If you open these in LC Designer, you can view the script by selecting the menu drop down and looking at the script at the top of the window Editor. If the script editor is a single line, you can drag the lower edge to make it bigger.

    Good luck

    Niall

  • How can I change the contents of a text field in a PDF form with a defined variable?

    Hi all!

    First time poster and getting quite frustrated trying to understand this issue. Here's the scenario: I use Acrobat Pro 10 to create what is essentially a form of giant order. I have designed the document in InDesign, defined the various buttons and other whatnot and then it exported to Acrobat to continue the construction of the form.

    I have a radio button group called 'conference_opportunities' that contains different options at different prices, so they are all the same, but have different values (so that they belong to the same group and only one can be selected at a time).

    What I've done is created a 'MouseDown' event on the button that sets a variable called 'ConferenceOpportunity', which is equivalent to the title of the option they pick. Then, I want to take this variable and display in a text box called "Conference_Option". I use a variable because my radio buttons values are actual prices of the option they pick, so I can't set the value as the title of the option.

    If its an array of boxes and option at the bottom of the page, there is the Option that they selected, the quantity (which can change) and value (in dollars)

    I also then want to display this variable at the end of the document as a kind of summary of what they have chosen to buy as well, but I guess it's the same code.

    I'm not an expert at all Javascript, so code snippets would help greatly. I looked on the Document from Adobe on the SDK and API and have not been able to find a solution. I also turned to the Almighty google and still no luck.

    Any help would be greatly appreciated!

    Thank you all

    Right now, you have to do is use this variable to the value property of your text field... Then add this at the end of your code:

    this.getField("Conference_Option").value = ConferenceOpportunity;

    Also, I would use not MouseDown, MouseUp.

  • The analysis of the xml in a text field string

    I call a Web service that returns a string in XML format as follows:

    < TemplateList >

    < template >

    < ID > 0 < /ID >

    < category >

    < name > Mine now < / name >

    < product >

    < ID > 0 < /ID >

    < description > SOLE HEEL CUP STAR JR. BLUE < / Description >

    < HDMSProductId > 227 < / HDMSProductId >

    < LawsonId > 216156 < / LawsonId >

    < PopupMessage / >

    < price / >

    < / product >

    < / category >

    < category >

    < name > old new < / name >

    < product >

    < ID > 0 < /ID >

    SMALL SLEEVES < description > TUBE PEDI-FOAM < / Description >

    < HDMSProductId > 224 < / HDMSProductId >

    < LawsonId > 216152 < / LawsonId >

    < PopupMessage / >

    < price / >

    < / product >

    < / category >

    < category >

    the four-legged < name > < / name >

    < product >

    < ID > 0 < /ID >

    SMALL SLEEVES < description > TUBE PEDI-FOAM < / Description >

    < HDMSProductId > 224 < / HDMSProductId >

    < LawsonId > 216152 < / LawsonId >

    < PopupMessage / >

    < price / >

    < / product >

    < / category >

    < category >

    Spirit of < name > < / name >

    < product >

    ... etc.

    < / product >

    < / category >

    < / template >

    < / TemplateList >

    I am drilling down to retrieve this string data. What is the best way to do so in the form of LC Designer?

    I tried to link the result to a text box and use applyXPath, but it's complicated when there is more than 1 product to go. Suggestions and examples are greatly appreciated!

    Hello

    What do you call the Web service.  If you use a data connection, and then you normally would bind a field to the result (even if this field is hidden).  If you use NET. SOAP, by default, you will get a return JavaScript object.

    But to answer your question, you can use E4X

    var responseString = "';

    responseXML var = new XML (responseString);

    for each (var in responseXML.Template.Category category)

    {

    Console.println (category. Name + "" + category. Product.Description);

    }

    Concerning

    Bruce

  • The legend of a text field border

    Does anyone know how to get the edge of the legend of a text field and the value section is visible to a user of the form?  It's a bit confusing when someone enters a field, and there is no line between the legend, they can't change it, and the value, they need editing.

    Choose different skins for the field will make very clear. If you choose to have no appearance there is no deliniation between the two. You can set up to change the background color of the zone to enter and deliver it to the output. This technique will highlight the field that has the focus, and there is no doubt as to where the field stops and starts.

  • my iphone hangs when I try to open the content of the email

    my iphone hangs when I try to open the content of the email

    What ios version do you have? It's 9.3? Because there is a bug in the most recent update, which can freeze your mail and Safari.

    Apple should have an update out before the end of week

    Fingers crossed

  • When you try to retrieve the updates of Windows XP, I get an error of 0 x 80070424. This number does not profile in any recommended solution.

    When you try to retrieve the updates of Windows XP, I get an error of 0 x 80070424. This number does not profile in any recommended solution

    Hello

    This should help you:

    "Error 0 x 80070424 occurs when you use Windows Update, Microsoft Update, or Windows Firewall.

    http://support.Microsoft.com/kb/968002

    See you soon.

  • try to save the contents of the hard drive for drive external hard error0.80070020. Spike

    Try to back up the hard drive internal to an external hard drive, Windows Vista. Error message 0.80070020 receipt, no return to the top. Spike

    Hello

    1. don't you make changes on the computer before the show?
    2. What is the accurate and complete error message that appears on the computer?
    3. How do you back up the hard drive?
    4. are you using Windows backup and restore, or you are using a third-party backup program?
    5. do you use windows backup and restore?

    Method 1:
    Clean boot the computer, and then try to save the contents of the hard drive and check:
    How to troubleshoot a problem by performing a clean boot in Windows Vista or in Windows 7
    http://support.Microsoft.com/kb/929135
    Note: After a repair, be sure to set the computer to start as usual as mentioned in step 7 in the Knowledge Base article.

    Method 2:
    You can also try to disable antivirus and then try to backup. Follow the steps in this link: http://windows.microsoft.com/en-US/windows-vista/Disable-antivirus-software

    Important: Antivirus software can help protect your computer against viruses and other security threats. In most cases, you should not disable your antivirus software. If you need to disable temporarily to install other software, you must reactivate as soon as you are finished. If you are connected to the Internet or a network, while your antivirus software is disabled, your computer is vulnerable to attacks.

    Method 3:
    If the problem persists you can try running the disk check and check hard disk errors:
    http://Windows.Microsoft.com/en-us/Windows7/check-a-drive-for-errors
    Note: When you run the disk check, there is a risk of data loss, you can take a backup of the data on the drive before running the disk check
    Note: This link is applicable for windows vista.

  • When I try to access the content that require Silverlight, I receive a message to install Silverlight, but it is already installed

    When I try to access the content requiring silverlight I receive a message to install silverlight.

    When I try to install silverlight, I get a message that it is already installed. In my view, it is already installed, but not working properly.

    Thank you.

    Original title: silverlight help?

    Hello

    1. have there been recent changes to the system before the show?

    2. when exactly you get this error message?

    3. what Web browser do you use?

    4. do you get this error when you use Internet Explorer?

    Please provide more information on the issue to help you best.

    I also suggest you to post here:

    Silverlight .NET forums
    http://forums.Silverlight.NET/search

  • Doesn't have installation of Vista updates. He continues to try set up the third update with 0% completion and then it turns off and start again from the beginning. Keep in the loop... Help! There is no error message.

    As above. He is not in windows more simply the third update installation and then turns off computer and restart new since the beginning. Tried running safe mode but without success

    Restore point:

    Try typing F8 at startup and in the list of Boot selections, select Mode safe using ARROW top to go there > and then press ENTER.

    Try a restore of the system once, to choose a Restore Point prior to your problem...

    Click Start > programs > Accessories > system tools > system restore > choose another time > next > etc.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

     

    If restore work not and you do not have a Vista DVD from Microsoft, do a repair disc to do a Startup Repair:

    Download the ISO on the link provided and make a record of repair time it starts.

    Go to your Bios/Setup, or the Boot Menu at startup and change the Boot order to make the DVD/CD drive 1st in the boot order, then reboot with the disk in the drive.

    At the startup/power on you should see at the bottom of the screen either F2 or DELETE, go to Setup/Bios or F12 for the Boot Menu.

    When you have changed that, insert the Bootable disk you did in the drive and reboot.

    http://www.bleepingcomputer.com/tutorials/tutorial148.html

    Link above shows what the process looks like and a manual, it load the repair options.

    NeoSmart containing the content of the Windows Vista DVD 'Recovery Centre', as we refer to him. It cannot be used to install or reinstall Windows Vista, and is just a Windows PE interface to recovering your PC. Technically, we could re-create this installation with downloadable media media freely from Microsoft (namely the Microsoft WAIK, several gigabyte download); but it is pretty darn decent of Microsoft to present Windows users who might not be able to create such a thing on their own.

    Read all the info on the website on how to create and use it.

    http://NeoSmart.net/blog/2008/Windows-Vista-recovery-disc-download/

    ISO Burner: http://www.snapfiles.com/get/active-isoburner.html

    It's a very good Vista startup repair disk.

    You can do a system restart tool, system, etc it restore.

    It is NOT a disc of resettlement.

    And the 32-bit is what normally comes on a computer, unless 64-bit.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    If the above does not resolve the problem:

    Windows Update Forum:

    It comes with Vista, upgrade install and activate Forum.

    You will get the best help for any problem of Update/Service Pack in the Windows Update Forum; the link below:

    http://social.answers.Microsoft.com/forums/en-us/vistawu/threads

    When you repost here, kindly include the Error Codes, and exactly what is happening when you try to update.

    In this way, you will receive the best help.

    See you soon.

    Mick Murphy - Microsoft partner

  • Is it possible for someone to insert a logo when you fill out a form to fill out? I'm looking for all the options under the button 'add a text field.

    I have created a form to fill out that is a contract, but I need a way for the person who is to fill the form to insert their logo.  Is it possible for someone to insert a logo when you fill out the form to fill out? I'm looking for all the options under the button 'add a text field.

    It is not possible within a text field, either. If they have Acrobat, they can use the built-in under Tools - editing content Add Image tool.

    If they drive XI or higher, they can use a button form field you will need to set up for them, but the image must be in PDF format.

  • I have two text fields, where the user will sign a text field and the other text field should be mandatory

    I have 2 text fields, and how can I do a condition when the text 1 field is entered, then they must enter data into the text field 2.  I know it seemed simple, but I'm just a beginner in this... Thanks in advance!

    Hello

    I'm sorry, I forgot this matter.

    Please try this code...

    If (this.isNull)

    {

    TextField2.validate.nullTest = 'error ';

    }

    on the other

    {

    TextField2.validate.nullTest = "disabled";

    }

    Hope than that,

    S, candy.

  • How do we uninstall 'player fantapper' program? When I try to uninstall the program he wants to open and run.

    How do we uninstall 'player fantapper' program?  When I try to uninstall the program he wants to open and run.

    Learn how to use Bing.

    http://answers.Yahoo.com/question/index?QID=20110425162538AAU5Iun

Maybe you are looking for