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.

Tags: Acrobat

Similar Questions

  • 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 to fill a field based on a menu drop-down select in another area?

    Here's what I'm trying to do:

    1 field is a drop down selection menu that requires a user make a mandatory selection that is in this case a list of apartment complexes. What I'm trying to accomplish, is once the user makes a selection in the drop-down list (field1) that it will fill the standard box 2 (txt) with the corresponding address of apartment complexes.

    So I seek Talan field 1 apartments, it could fill with Talan apartments address 2 field. I tried messing around with the calculation scripts, but I'm a fight lost here. Little help would be greatly appreciated!

    Hello

    Here's a sample: https://acrobat.com/#d=Hi0ZwVgVB1PWbxc6OJ0z4A where the script to the output of the drop event sets the value of the object of the address.

    Good luck

    Niall

  • Make the text visible/invisible field based on the menu drop-down

    I currently have a form that automatically calculates dates based on the value in particular the "Text10" field with the current script of

    Custom calculate script for the field 'date '.

    (function () {}

    Get the date in the field

    var v = getField("Text10").valueAsString;

    Convert string to date

    var d = util.scand ("mm/dd/yyyy", v);

    Add 30 days

    d.setDate (d.getDate () + 31);

    Fill in this field with the result

    If {(v)

    Event.Value = util.printd ("mm/dd/yyyy", d);

    } else {}

    Event.Value = "";

    }

    })();

    I want to thank this option to hide the field if one selects a particular value in a drop-down list. Allows to call the drop "decline.1" and values are just 'Yes' and «» Yes makes visible, hide it.

    Is this possible? I looked through the forums and can't seem to find a solution. I use Adobe Acrobat X Pro

    Thank you

    Yes, it is possible. Just add the following line, this isn't little matter so long it after the first year and before the last:

    Event.Target.Display = getField("drop1").value = 'no '? Display.Hidden: display.visible;

  • Please help guys - hide fields based on the menu drop-down - javascript - output (adobe livecycle)

    I'm trying to hide certain fields in a form that is based on any value selected from a drop down menu, as shown in the image below. My main dropdown has values such as $25, $50 $ 75 and based on what value is selected, I want to hide two text field and date field, I created. Also when you select a value of $1000 I want to hide the ' field Manager ($ 25 - $ 100).

    hidefields.jpg

    That's how I would solve the problem. Note that the numbers used in the comparisons are links in the drop down menu.

    I don't know if it solves your problem exactly, but he should at least get you on the right track.

  • Filling of a numeric field by selecting from a drop-down list

    Hello all;

    I went through the 38 pages on the form now to try to understand it myself. I must have missed something or this day becomes medium long.

    I am filling a numeric field that is based on what is selected in a drop-down list box.

    For the test, I use only 2 fields

    DropDownList1 and digital Field1

    I If (DropDownList1.rawValue == 1) { }

    NumericField1.rawValue = 25;

    }

    On the other;

    (DropDownList1.rawValue == 2) { }

    NumericField1.rawValue = 35;

    }

    That worked. I am now getting the error "missing; before the statement

    "6:xfa: form1 [0]: #subform [0]: DropDownList [0]: output"

    Specify the value of points is checked in the tab links for DropDownList1.

    I said this with a single selection, who worked

    if (DropDownList1.rawValue == 1) { }

    NumericField1.rawValue = 25;

    }

    Thank you all

    Chomp

    If it's a copy/paste of your script, you have a semicolon after the "else" and "else" should be lowercase.

    And for nested IFS, you need an "else if", so:

    If (DropDownList1.rawValue == 1) {}

    NumericField1.rawValue = 25;

    }

    Else if (DropDownList1.rawValue == 2) {}

    NumericField1.rawValue = 35;

    }

    ElseIf...

    If you have a lot of statements, you might want to look at using a statement that may be easier to read.

    {Switch (DropDownList1.RawValue)}

    case '1 ':

    NumericField1.rawValue = 25;

    break;

    case '2 ':

    NumericField1.rawValue = 35;

    break;

    etc.

    }

  • Show drop-down list field hide selection in another drop-down list box

    Hello I need to create two drop-down fields on a dynamic PDF in LiveCycle. The first field contains three choices. When a user selects an item in the drop-down list first I would like to a new field of drop-down list has been shown. For each item in the first drop-down list appears a new field drop-down list with unique values. If the user chooses blue drop-down list of blue shades indicate in this menu drop-down will be various shades of blue to choose for. If the Red is chosen, Shades of Red dropdown with appearance and if yellow is displayed the same occurs. Also if the user must go back and change their selection in the first drop-down list, they can do the same. Any suggestions?

    Thank you in advance.

    There are 2 ways you could do this. The first is just to have the 3 drop-down lists for the second box to separate and do them all hidden. The output of the first dropdown event would then have the code that would make it the second box become visible, something like (in formcalc):

    If ($ == 1) then

    dropdownRed.presence = "visible".

    dropdownBlue.presence = "hidden".

    dropdownYellow.presence = "hidden".

    ElseIf ($ == 2) then

    dropdownRed.presence = "hidden".

    dropdownBlue.presence = "visible".

    dropdownYellow.presence = "hidden".

    ElseIf ($ == 3) then

    dropdownRed.presence = "hidden".

    dropdownBlue.presence = "hidden".

    dropdownYellow.presence = "visible".

    endif

    The other option is just to have a dropdown that dynamically changes its options based on the results of the first box. So in the second box preOpen event you might have something like (in formcalc):

    If (dropdown1 == 1) then

    $. clearItems()

    $.setItems ("light red, dark red")

    ElseIf (dropdown1 == 2) then

    $. clearItems()

    $.setItems ("sky blue, dark blue")

    ElseIf (dropdown1 == 3) then

    $. clearItems()

    $.setItems ("light yellow, dark yellow")

    endif

  • How does one increase the number of entries in the drop-down list of the address bar?

    It seems that the number of entries in the drop-down list of the address bar is limited to twelve URLS. I would find it convenient that more than twelve years can be shown, but do not know how to increase the number.

    Increase or decrease browser.urlbar.maxRichResults using Subject: config

    NOTE: The FasterFox extension may affect the number of items displayed if you have it installed (addons > Extensions).

    If this answer solved your problem, please click 'Solved It' next to this response when connected to the forum.

  • How to set the number of visible items in the drop-down list

    How can I specify the number of elements is visible in the list when I open a drop-down list? By default, I see 5 items, but I want to extend that to 10.

    Reference doc: http://www.blackberry.com/developers/docs/airapi/1.0.0/qnx/ui/listClasses/DropDown.html

    for example

    var dd:DropDown = new DropDown();
    DD.x = x;
    DD.y = y;
    dd.rowCount = 10 ; Set this value to the need... like for example 10
    CDI Width = w;
    CDI Height = h;

    ...

  • How to remove a web address in the address bar drop down list? The old advice does not work. Help!

    The OLD advice for this problem, listed below, does NOT work. Web addresses just do not detach:

    1) click the arrow located on the right side of the address bar of Firefox. A list of URLS will come down.

    (2) place your cursor on the URL that you want to delete manually.

    (3) press and hold the "shift" on your keyboard. Then, press the "Del" key The URL highlighted is removed. Or I have been advised to hold the 'Ctrl' key Neither work.

    There are a few new instructions, updates on how to remove the unwanted drop web addresses. Everyone?

    Hi, if your problem is removal of the history of the site. Click on the firefox menu and go to history-> history-> click history on the left side of the window. Now you can remove unwanted Web sites from the list.
    If you want to delete bookmarks fallow the instructions remove bookmarks

  • How to remove entries or register a new in the drop-down list of the Anyconnect client?

    I have a user who uses Anyconnect for quite awhile now, and we have activated the ASA profiles a few times over the past year.

    My client seems very well, but maybe also because I have a new laptop without the previous hidden settings.

    The problem: old entries in the 'box' connection to still appear and if I type a new entry it will connect but not save it as a connection profile.

    If I start from scratch by uninstalling the client, ranging on the external right site (vpn.mydomain.com), it will automatically install the customer very well yet.  But the client install still just shows the old entries and not the correct (what should the list as vpn.mydomain.com).

    I deleted the entries in personal profile under c:\users\username\appdata\local\Cisco and that to remove an entry, but the other is still there and I can't find where on the system, it is stored.

    However, the great thing is that it does not save the correct entry of vpn.mydomain.com in the list of connections, so the user must either enter it and click on connect manually or if they have to go to the website https://vpn.mydomain.com and connect via the site itself.

    Any ideas on how to get this fixed so that his client only shows the correct host in the customer?

    On Windows, see C:\ProgramData\Cisco\Cisco AnyConnect guarantee mobility Client\Profile. profile entries must complete this directory.

    New connections should add profiles or you can construct one manually using the following simple model, replacing it with your values where I typed xxxx:

    http://schemas.xmlsoap.org/encoding/">."

    xxx

    xxx.xxx.xxx.xxx

    SSL

    There are many more entries in option, but it's a bone at naked one.

  • Reading JSON file based on the selected drop-down list item

    I have little code shown below.

    I'm trying to read data from a JSON file based on certain criteria, in this case all the suburbs on a territory

    I can do that quite easily in a liquid hard coding the territory, however, I want to use the value of the < select > option

    I understand that this can be achieved with JavaScript, is it possible otherwise?

    < select id = 'territory' >

    < option value = "xx" >--please select--< / option >

    < option value = "CBD" > CBD < / option >

    < option value = "North" > North < / option >

    < option value = "South" > South < / option >

    < / select >

    {model module_json json="/_System/shipping/shipping.json" = "" = "shipping" collection "}

    < select id = "suburbs" >

    < option value = "xx" >--please select--< / option >

    {% for section in shipping.territory %}

    {% If the element.} TERRITORY is '< value on top of select >' %}

    < option value = "{{point." POSTAL CODE}} "> {{point." SUBURBS}} < / option >

    {% endif %}

    {% endfor %}

    < / select >

    Hi Craig,.

    You can skip liquid altogether and use JS to get the values you need for json.

    If you want to use liquid you need to load the last part with AJAX/XHR to enter the selected value.

    1. create a new file suburb.html and ajax request after #territory selected with the option as a parameter:

    URL: suburb.html? = north shipping

    2. the suburb.html file would be:

    {assign = globals.get.shipping-% selectedTerritory %}<- this="" will="" have="">

    {model module_json json="/_System/shipping/shipping.json" = "" = "shipping" collection "}

  • How can I remove a UN server used in the drop-down list?

    Cannot remove an old server in my menu drop-down. May add one, but not delete.

    Firefox send an e-mail, it's strictly a web browser.

    If you use Firefox to access your e-mail, you use "webmail". You must seek assistance from your service provider or a forum for this service.

    If your problem is with Mozilla Thunderbird, let know us and we can move this thread to the queue of Thunderbird. This issue is currently in the queue of Firefox to get answers.

  • second drop-down list based on the first drop-down list Jdev 11.5 of loading

    Hi all

    I have a requirement of the second dropdown on the first loading selection drop-down list.

    Ex:-con I drop down state list, when I select and national, it must load city States (dropdown).

    I tried to use valuchange Stanley with partial trigger, that it did not work. Any help would be a great help.

    Please let me know.

    Thank you
    Nitin

    Published by: 811407 on December 21, 2011 02:59

    Published by: 811407 on December 21, 2011 02:59

    http://www.YouTube.com/watch?v=nXwL2_RP7AQ.

    you for example: here goes.
    http://www.YouTube.com/watch?v=94PrwXWDEjI

    http://andrejusb.blogspot.com/2008/12/cascading-lovs-in-Oracle-ADF-11g-update.html

  • Using a choice of multiple words in a drop-down list field to launch a java script

    I'm a complete newbie to manuscript of java and relatively new to your building in Acrobat.

    I use a drop-down list field to fill in automatically other fields based on my 1st drop-down list selection.

    The 1st field drop-down allows me to select a variety of suppliers.  Once I have selected the vendor, he auto-remplit the coordinates for this provider.

    I've plagiarized the writing of scripts from this link: https://acrobatusers.com/tutorials/change_another_field.  I even changed my domain names for the moment.  I'll change my return form field names and the script to match once I got it working like I want.

    If I use only one name in my drop down list provider (1 field), the script works perfectly and auto-remplit contact as expected information.  However, many of my suppliers are two words or more... and I need those names in print, so I can't do just a contraction of a Word.  Here is the script I use:

    Here is an example of a supplier of single word name that works as expected:
    Put all vorkriegsbevölkerung data in a single data structure
    var DeptData = {ADLEMI: {contact: "P.O. BOX 2371",}}
    E-mail: "DOWNEY, CA 90242."
    {{deptnum: "PHONE: (562) 923-0333 FAX: (562) 923-8111 '}};
    function SetFieldValues (cDeptName)
    {
    this.getField("DeptContact").value = DeptData [cDeptName] .contact.
    this.getField("DeptEmail").value = DeptData [cDeptName] .email;
    this.getField("DeptNumber").value = DeptData [cDeptName] .deptnum;
    }

    Unique provider name, I used in the example above is "ADLEMI."  If I add 'BEST' to ADLEMI (see below), I get a syntax error.  I really need to be able to use several words in my list drop-down provider to trigger auto-fill.

    Put all vorkriegsbevölkerung data in a single data structure

    var DeptData = {ADLEMI BEST: {contact: "P.O. BOX 2371",}}

    E-mail: "DOWNEY, CA 90242."

    {{deptnum: "PHONE: (562) 923-0333 FAX: (562) 923-8111 '}};

    function SetFieldValues (cDeptName)

    {

    this.getField("DeptContact").value = DeptData [cDeptName] .contact.

    this.getField("DeptEmail").value = DeptData [cDeptName] .email;

    this.getField("DeptNumber").value = DeptData [cDeptName] .deptnum;

    }

    The only difference is that I added a space and the word 'BEST' after ADLEMI.  Is there a way to get around this.  I need to have several words in my drop-down list, or at least the full name of the vendor indicating in the field when I print it.

    Thank you

    Place quotation marks around the name of the element.

    Monday, April 13, 2015, at 17:29, bpwhistler, [email protected]>

Maybe you are looking for