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

Tags: Adobe LiveCycle

Similar Questions

  • How to import a table from a drop down list?

    I am very new to ColdFusion and learn things I want.  I wonder how to import a table from a drop-down list.  I created the table and the drop-down list but cannot make it work properly.  I would like to see a small example.

    Please help thanks...

    Here is a very simplistic example. Please research each tag in the documentation to see how they can be used:

    ArrayNew (1) >

    Sorry for formatting issues.

    See you soon

    Eddie

  • How to fill two text fields based on a simple drop down list

    I'm trying to set up a form so that the two text fields will fill with a text by default (separate for each text field) at the same time.

    Here is a screenshot of the fields.

    Thus, for example, if I select Utah in the drop-down list in 'State', ' OH Fund Center "is automatically filled in with APWSWR4949 and"OH WBS"is automatically filled in with WR49.73.0003.

    I have a similar script for down text in form fields, but the script does not work.  I tried the following script:

    var v1 = this.getField("RecState").valueAsString;

    If (v1 == "Utah") event.value = APWSWR4949;

    else event.value = "";

    However, it would not AutoFill OH Fund Center area.  And I have no idea how complete both fields at the same time.

    Any help would be greatly appreciated.

    Thank you!

    Crystal

    Strings must be enclosed in quotation marks. So change your code:

    var v1 = this.getField("RecState").valueAsString;
    if (v1=="Utah") event.value = "APWSWR4949";
    else event.value = "";
    

    If it works, then you can use code similar to your other field.

  • 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

    }

  • from the drop-down list selection to multi-line output

    I am trying to create a pdf form with Adobe XPro, where I will have multiple delivery addresses. I want to have is that the user can select the correct recipient group in the drop-down list.

    Given that the drop-down lists pdf format are just simple lines the drop-down list selection could only display the name of the company (e.g., COMPANY A) and selecting the company wanted to, this would trigger the whole address (multiline) to appear as described below (on another text field is ok if necessary)

    THE COMPANY

    StreetAddress 1

    City of ZIP-1234

    Does anyone have an easy solution for this?

    I have created a sample form for you, please look at attachment.

    PDF form does exactly what you want.

  • How to change a text field value based on a drop down menu?

    Hello experts.

    I have a simple form with a very long drop-down list, and two text boxes.  I use a table to fill textbox1 based on the value selected in the drop-down list, and it works as expected.  Some of the values in the drop-down list, but not all, should cause textbox2 become unalterable.

    Does anyone have an example script for this?  Any help would be greatly appreciated.

    I use LiveCycle Designer ES 8.2 on Windows Vista 32 bit.

    Thank you

    Jerald

    You can do the TextField2 as readonly using the Script based on the value in the drop-down list.

    If (dropdoqn1.rawValue == "") {}

    TextField2.access = "readOnly";

    }

    You can modify the script above that you need...

    Thank you

    Srini

  • How to change or remove a line from a drop down list?

    I have a spreadsheet Numbers drop down box that shows the 3 lines of the text when I start typing the text in the cell. I have to enter the same text 3 times during the construction of the document. How can I remove 2 of these lines of text?

    Hi Brudduh,

    Click the cell that contains the context menu,

    Click on the brush to Format to open the Format Inspector and click cell.

    The Inspector displays the menu items in the context Menu in this cell.

    • To remove a menu item: click on the item to select. Click the button below the list.
    • To edit an item: double-click on the item to select content. Modify if needed.
    • To add an item: click on the button +. Type the content of the element.

    To use the same drop-down list in a different cell:

    • Click the cell that contains the menu to select. Copy.
    • Select the cells to the same menu. Dough.

    Kind regards

    Barry

  • Police found during the opening of file and not able to solve, but drop-down list fonts?

    Hi, I just downloaded some files from a friend and he sent me a link to download the fonts. I have done so and 98% of the book of fonts, but there are two fonts, with that I fight.

    When I open the file I get the police lack of attention and it asks me to set the fonts. I can't find the police appropriate in the drop-down list if I click "solve" and begin editing the file. Then I met a text which lack of fonts and I'm able to highlight text and change the text for the police appropriate using the text tool and the font you are looking for is in the drop-down list.

    The fonts that are not working are:

    Franchise "BOLD" and BebasNeue

    The problem is there are several separate incidents where occur these fonts, and passing through each change manually would take a lot of time.

    Is there something I can do to fix all at once?


    Thank you

    Harry

    d9c317be81edbaf79cf4e5225a6f2ca8.png83f707320ba36bdec7b840e37c302791.png

    I don't see the two fonts in the list that show you.  I see Bebas Neue xxx but no Bebas Neue without any additional style. Try Bebas Neue Download Bebas Neue police - thousands of fonts for free download

  • How to import a list from a drop-down list?

    I have a list of 500 names that I need to import in a drop-down list instead of typing them one by one.

    Can someone point me in the right direction?

    I tried all sorts of things but can't get the first line to stick in the drop-down Options menu.

    Help, please! Tight deadline!


    Thank you

    Harry

    Here's a simple form that you can use: https://acrobat.com/?d=sIJoabh12oYOY19AuTZ9yw

    Paste the list into the field of large text at the bottom, click on the button at the top and then copy the drop-down list on the form and paste it into your form.

    This demo has been discussed in a previous thread: http://forums.adobe.com/thread/1025337?start=0&tstart=0

  • Select from a drop-down list and the specified element values are displayed in the textfield

    I need for one to be able to select from a list drop-down and specified the item values appear in textfield.

    For example, if I select Amy

    If I select Bob

    If I select Jane

    Amy

    Bob

    Jane (I want to appear as shown in the list)

    I associated a value to each item in the drop-down list so that the choice is easy to compare and determine what initial (default) value to the value in the text field. In my drop down list change event, I have the following:

    var sNewSel = this.boundItem (xfa.event.newText);

    Switch (sNewSel)

    {

    case '1': / / Amy

    TextField1.rawValue = "Amy \n";

    break;

    Switch (sNewSel)

    {

    case '2': / / Bob

    TextField1.rawValue = "Bob \n";

    break;

    Of course that's not work one name shows at a time. Help, please!

    Thank you

    Don't know what the code is supposed to do, but basically, you want to add the name of the drop-down list the addition on the current value of the TextField? Why not use the dropdownlist display value directly? For example on the change event:

    if ( TextField1.rawValue == null )
        TextField1.rawValue = xfa.event.newText;
    else
        TextField1.rawValue += ( "\n" + xfa.event.newText );
    
  • Help select the value from a drop-down list box

    Hello

    I develop a script (in JavaScript) which will allow a user to select an export PDF presets (that are loaded in a drop-down list) and then export the InDesign file to PDF, by using the selected PDF preset.

    I have the combo fill properly and I am also able to export to PDF correctly, however I have a problem setting the preset has been selected by the user. Here are some of my code fragments:

    Drop-down list:

    with(borderPanels.add()) {

         pdfDD = dropdowns.add();

         sl = new Array();

         for (i = 0; i < app.pdfExportPresets.length; i++)

         sl.push(app.pdfExportPresets[i].name);

         pdfDD.stringList = sl;
         pdfDD.selectedIndex = 0;

    }

     

    ...

     

    myPreset = pdfDD.selectedIndex;

    In PDF format:

        // Open, Export, & Close
        for (i = myFileAmount; i >= 0; i--) {
            app.open(File(myFolderContents[i]));

            createHyperlinks();

            app.activeDocument.exportFile(
            ExportFormat.pdfType, File(myFolder.fsName + "/" + app.activeDocument.name.split(".indd")[0] + ".pdf"), false, myPreset);
            app.activeDocument.close(SaveOptions.no);
        }

    During the passage of myPreset, it is defined as 6 (the index from the drop-down list).  How can I set myPreset that the real value of what has been chosen?

    Thank you!

    In view of your code, you probably need something like:

    myPreset = app.pdfExportPresets.itemByName (pdfDD.stringList [pdfDD.selectedIndex]);

    @+

    Marc

  • Fill a textfield with the drop-down list selection

    Day of goo,

    I have a menu drop down and a textfield in a table with one line and an Add button.

    The line is repeatable, now, when I select a value in the drop-down list, say "23" and it fills the textfield say with "Jordan".

    Then I click the addButton to add a new line, now I select '7' in the new drop-down list and its supposed to fill the new textfield with "David Villa,"

    Instead, he replaces what was on the original textfield("Jordan") with David Villa, leaving the new empty textfield.

    Can someone help me please.

    Another thing, I have to select two times for the drop-down list to the fire, why is this?

    Hello

    First thing: I suspect that you have the script to the change event, but use .rawValue for the test. With the drop-down menus, I tend to use the exit and .rawValue event.

    With respect to the textfield, you probably use a too full reference, like "Row1.usersName". If you just use "usersName, for example the name of your textfield, then Acrobat/Reader uses the particular instance of the textfield in the same line as the drop-down list.

    Hope that helps,

    Niall

  • Raising the event "output" from a drop-down list in all instances of a table row

    I have a drop-down list in a row of table with multiple instances that performs a calculation on the exit event. This calculation takes information from 2 other drop-down lists listed above not repetitive rows of the same table.

    The behavior desired is: If the user change their choices above, all instances of the drop-down list below to execute the "Exit" event script to access the new values above.

    My script is:

    RowOptionalCoverage.DdlCoverageType.execEvent ("exit");     It works, sort of

    It updates only the first instance of RowOptionalCoverage and any subsequent instances. The user can 'Tab' through instances and trigger output for each instance event, but this isn't a reasonable solution.

    I tried using the method resolveNodes without success. I understand, using the method resolveNodes may be required when you reference multiple instances of an object:

    this.resolveNodes ("RowOptionalCoverage [*]. DdlCoverageType [*] ") .execEvent ("exit");"     does not work

    xfa.resolveNodes ("RowOptionalCoverage [*]. DdlCoverageType [*] ") .execEvent ("exit");"      does not work

    No doubt, I have to be incorrectly using the resolveNodes or rate something? Probably something simple.

    All the tips are greatly appreciated.

    Stephen

    Hello Stephen,

    You need to loop through each instance of the line and force the exit event. Without the form, it should look like:

    var oRows = xfa.resolveNodes ("RowOptionalCoverage [*]");
    oNodes var = oRows.length;
        
    for (var i = 0; i)< onodes;="">
    {
    xfa.resolveNode ("RowOptionalCoverage [" + i + "]"). DdlCoverageType.execEvent ("exit");
    }

    You could also index table to determine the number of row repeat:

    var oNodes = RowOptionalCoverage.instanceManager.count;

    You may change this to make it work.

    Good luck

    Niall

  • How to clear the contents in plain text file?

    Can someone tell me how to remove all of the content in the plain text file!

    Send samples if you have for reference

    Use the FileConnection.delete method and the FileConnection.create method to remove and create a file.

  • 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.

Maybe you are looking for

  • I use Firefox 4.0.1 but can not install addons for my version.

    Center points of the addons that I use 3.6.10 version. Screenshot

  • Satellite C660D-16F - horizontal lines on the screen flicker

    HelloI'm having a problem with lines flickering cityscape randomly appearing on the screen during a random time (during all kinds of situations, video playback web browsing, the CPU usage high or low, etc.). A very similar behavior can be seen on the

  • Drag-to-disc 32 Vista

    I get this message when trying to fix Rocio

  • CS6 insertion table combo box case

    In DW CS6, I build a site based on a template with three editable regions. I usually work in split mode, PHP-MySQL projects such as the current one, and I've been building sites based on Dreamweaver templates since 1998; but this problem has left me

  • ADF Mobile - XML parsing

    Previously, I posted on the call of a remote webservice - call remote using ADF Mobile service and I get my weather app already working. WebService returns me a string which is a XML form. I want to parse the XML to make it easy to read. The current