Create a dynamic drop-down list field in Adobe Acrobat Pro XI

Hi all. I am creating a field in one of my forms using Adobe Acrobat Pro XI. I have a drop down list of 'core' items, and according to what is selected in the list, I want a second drop-down list to give different choices. I've searched and searched and have javascript that I thought might work, but maybe I'm have a mistake or I'm place javascript code in the wrong place, because it does not work. I know very, very little about javascript, any help would be so appreciated.

I use Adobe Acrobat Pro XI. I added a "new field" and selected "drop-down list. The domain name is ProvType. The options of the menu drop-down are:

Hospitalized patients

External consultations

Doctor

I have "Commit selected value immediately" selected. The field is not validated. The format is 'none '. There is no measures or calculations associated with it.

I then created another dropbox and named SubProvType. Under Actions, I selected the trigger as the mouse upwards and then selected the Action "executes a JavaScript script. I selected the Add button and he hit in the JavaScript editor:

Switch (ProvType.rawValue)

{

case "Hospitalisation":

this.setItems ("Hospice, hospital, Nursing Facility");

break;

"outpatient": case

this.setItems ("adult day Center, Home, others");

break;

case 'doctor ':

this.setItems ("surgeon, general practitioner, neurologist");

break;

}

What I want to do is:

If "Hospitalization" is selected, I want only the following options to be available in the second drop-down list box "SubProvType":

Palliative care

Hospital

Nursing facility

If "outpatient" is selected, I want only the following options to be available in the second drop-down list box "SubProvType":

Adult day Center

Home

Other

If the 'doctor' is selected, I want these options to be available in the second drop-down list box "SubProvType":

Surgeon

Family practice

Neurologist

However... when I close form editing and try to select a different option in the ProvType field, SubProvType field is left blank and there is no options available. Also, there are no errors.

I must be missing something, but I have no idea where to start. Thank you in advance for any help anyone can provide.

Use this code as the ProvType custom validation script (and remove any code that you have associated with SubProvType):

switch (event.value) {
    case "Inpatient":
        this.getField("SubProvType").setItems(["Hospice,Hospital,Nursing Facility"]);
        break;
    case "Outpatient":
        this.getField("SubProvType").setItems(["Adult Day Center,Home,Other"]);
        break;
    case "Physician":
        this.getField("SubProvType").setItems(["Surgeon,Family Practice,Neurologist"]);
        break;
}

Tags: Acrobat

Similar Questions

  • I created a PDF form with several drop downs, all with the same drop-down values. When I select a value of 1 in the drop-down list fields, it breeds in all others - which I don't want. How can I fix?

    I created a PDF form with several drop downs, all with the same drop-down values. When I select a value of 1 in the drop-down list fields, it breeds in all others - which I don't want. Can I fix?

    I am fairly new to this, but I think it has to do with the way you have drop them downs named. Copy you a then keep stick in each area? If so, that's the problem. You must rename each with a different number: Dropdown1, Dropdown2, etc. I think this might solve the problem.

  • Dynamic drop-down list in the Bay of cluster

    I have a table of cluster that contains two drop-down list boxes. The first drop-down list box control which Articles of the second drop-down list box by writing in the node property [StringsAndValues] for the second box. The problem I have is when I create a new index in the table of cluster and select different values in the drop-down list boxes, it changes the area of dynamic drop-down list on all indexes in the table. Attached, that's what I have so far.

    Thank you

    Chris

    Wow, what are the chances of another thread like this so early.

    Check out this other thread and look at the link of Hooovahh to see a great way to change the drop-down list box strings during execution to give the appearance different drop-down list boxes. The reality is that you can't have the combo box different types/lists in the same table. So what it is, is to check what element you are clicked on and change the behavior of the combobox as a result.

  • Drop-down list field

    Hi friends,

    In my application from the drop-down list field that I used "ObjectChoiceField" it works but it does not feel like a drop-down list field

    How can I do?

    by the look, he must feel like a drop-down list field?

    Thanks in advance

    I've seen this done before overriding the method object of the ObjectChoiceField to use drawBitmap. In this way paint you a picture on the right of the field (such as the traditional arrow pointing down). You can also use drawRect to draw a rectangle around the whole thing make it look like more traditional.

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

  • 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

  • initialize a dynamic drop-down list

    I have a table (say table1) with 11 courses, of which 4 are foreign keys.
    When you create a new record, I use drop-down lists to fill 4 foreign key fields in table1.
    When I update the table 1, I use a drop-down list on the search page to select the record and pass it to the edit page via an URL parameter. No foreign keys appear in the new page into a field of text without problem and can be edited. Foreign keys can be displayed without problem, but if I want to change, I have to use a list of to do.

    Each foreign key is contained in a menu drop-down filled from its own set of records.

    Is there a way that these drop-down lists can be dynamically initialized to the foreign key value in Table 1? Or is there a better way to do it?

    Some of the key run in the hundreds, and having set all 4 manually before an update can be made is tedious.

    I work in php5 and Mysql.
    Howard Walker

    It solved!
    I was setting the initial value of the dynamic list of its own key, rather than the foreign key in table1.

    Must be getting old!
    Sorry to trouble you.

  • Problems of dynamic drop-down list box

    Hello

    I have a requirement for a list dynamic downdown.

    I use javascript itself to fill the 2 text fields in the drop-down list.  I need the list/menu area drop down to be able to have options to input from the user and the drop-down list. I selected the "user entered - optional" compared to the setting but does not seem to work.

    The drop has used names and if a new employee joined this company and I do not know the end user can enter the name of the employee in the field.

    I have attached a pdf file version.

    Any ideas or help would be great.

    See you soon.

    Hello. All you have to do is check the box "Enable custom text entry". You can find the object box > cell phone

  • The PHP/MySQL dynamic drop-down list

    I know this should be easier he became... I even bought two new books on PHP and Dreamweaver, and I'm still lost.

    I am trying to create a very simple search for a Web site. This research would be a category based with a drop-down list only search. There would also be an admin section that would add new records to the DB.

    So far, I have created a basic admin page that submits new records to the appropriate categories.

    I created a simple search with a dynamic Drop Down page, and I have created a basic results page.

    If the problem I have is that the Drop Down dynamic list shows the names of similar category according to the number of records exists. Where it should show only the unique category names.

    Once selected, the results page and the records are displayed correctly using a dynamic array.

    Anyone know what I should do to change this dynamic list so that it does not display the duplicate names?

    Thank you.

    destind4film wrote:
    > Can give you details on how to do it. I saw this same response in another
    > post in the forums but I do not understand where this setting is.

    This is a very basic SQL query. The SEPARATE after that SELECT keyword ensures
    that duplicate records are removed from the Recordset.

    > I checked my phpmyadmin and there is an option for single, but it will not
    > work for categories in my PB because there are naturally several entries
    > with the same name of category attached.

    UNIQUE is a type of index that forces a column to store only unique values.

    > I don't see this option in DW.

    You will not. Dreamweaver provides the absolute basics to create the
    code for working with a database. Unless you want to be severely limited in
    what you create, you have to learn a few basics of database
    design and build your own SQL queries.

    To add SEPARATE to your basic SQL query, you must click on the Advanced
    button in the Recordset dialog box and insert it into the SQL query by hand.

    --
    Adobe Community Expert David Powers
    Author, "The Essential Guide to Dreamweaver CS3" (friends of ED)
    Author, "PHP Solutions" (friends of ED)
    http://foundationphp.com/

  • How can I right - justify text in a drop-down list field in Acrobat 11?

    I have a literal that we want to include as a prefix in front of a field of account number.  Users wanted an option to use a No.:o account r
    Account number:, so I was going to justify the choices in the right drop-down selections but I do not see where to change the alignment propterty.  I used spaces before the non-literal account, but it would be better if I could right - justify the selections in the drop-down list box.

    Please let me know if there is a way to do it.

    Thank you!!!

    What exact version number? Look under help - about Adobe Acrobat.

    I also use Pro XI and that's what I see:

    I just thought of something, you should try... Look under Edit - Preferences - language and make sure that "Enable right-to-left language options" is checked. Maybe cause this option to appear.

  • How to enable/disable readonly in text fields, drop-down list field?

    For example, I have a dropdown field named "DropdownField" and a field of text called 'TextField '.

    Within 'DropdownField', I have four choices: Option 1, Option 2, another, combination. When the user first sees the "DropdownField", they see 'Select Option.' When the "DropdownField' select Option, Option 1 or Option 2 selected, I want to 'TextField' to be a read only field. However, what other or combination are selected, I want them to be able to grasp things in the 'TextField', which makes is not readonly. Also, tell someone selects 'Other', but realizes that they have made a mistake, I want them to be able to select Option 1, and have the return of 'TextField' read-only.

    Currently I have the JavaScript code as a MouseUp on "DropdownField: action

    var getField.DropdownField = drop;

    var getField.TextField = text;

    If (drop.value! = 'Other' | drop.value! = 'Combination')

    {text.readonly = false ;}

    on the other

    If(drop.value = 'Other' | drop.value = 'Mix')

    {text.readonly = true ;}

    However, the JavaScript code above doesn't seem to work. Please let me know what I'm doing wrong!

    You must use the event to validate drop-down list and use a script like:

    var f = getField("TextField");
    
    if (event.value === "Other" || event.value === "Combination") {
      f.readonly = false;
    } else {
      f.readonly = true;
      f.value = f.defaultValue;
    }
    

    Also, set the option in the drop-down list "Value Commit selected immediately".

  • Using dynamic drop-down list

    I've seen countless videos and read a lot of posts on how to create drop down menus, but the script I write still does not work. I am trying to create something pretty basic. I have two drop-down menus on two different pages. The value of the drop-down list on the first page will decide what appears on the drop-down list on the other page. I specified values of element for both lists. Any help would be greatly appreciated. Thanks in advance. So far, the code I created is as follows:

    switch (this.rawValue) { }

    case "1" :

    ShortList.WaterFireBurglary.WaterDamageOccupancy.addItem ("primary insured
    "or staff 24/7");

    ShortList.WaterFireBurglary.WaterDamageOccupancy.addItem
    ("70%-working torque");

    breaking ;

    case "2" :

    ShortList.WaterFireBurglary.WaterDamageOccupancy.addItem ("primary insured or personal 24/7");

    ShortList.WaterFireBurglary.WaterDamageOccupancy.addItem
    ("70%-working torque");

    breaking ;

    case "3" :

    ShortList.WaterFireBurglary.WaterDamageOccupancy.addItem
    ("Unoccupied 3-6 month/year");

    ShortList.WaterFireBurglary.WaterDamageOccupancy.addItem
    ("Unoccupied more than 6 month/year");

    breaking ;

    case "4" :

    ShortList.WaterFireBurglary.WaterDamageOccupancy.addItem
    ("Unoccupied 3-6 month/year");

    ShortList.WaterFireBurglary.WaterDamageOccupancy.addItem
    ("Unoccupied more than 6 month/year");

    breaking ;

    case "5" :

    ShortList.WaterFireBurglary.WaterDamageOccupancy.addItem
    ("Unoccupied 3-6 month/year");

    ShortList.WaterFireBurglary.WaterDamageOccupancy.addItem
    ("Unoccupied more than 6 month/year");

    breaking ;

    case "6"

    ShortList.WaterFireBurglary.WaterDamageOccupancy.addItem
    ("Unoccupied 3-6 month/year");

    ShortList.WaterFireBurglary.WaterDamageOccupancy.addItem
    ("Unoccupied more than 6 month/year");

    breaking ;

    case "7"

    ShortList.WaterFireBurglary.WaterDamageOccupancy.addItem
    ("Unoccupied 3-6 month/year");

    ShortList.WaterFireBurglary.WaterDamageOccupancy.addItem
    ("Unoccupied more than 6 month/year");

    breaking ;

    by default:

    OccupancyDropDown.addItem ("Please choose
    "" "Occupation");

    breaking ;

    }

    Hi, in your code need you 2 things...-> «:»

    case "6": <>

    ShortList.WaterFireBurglary.WaterDamageOccupancy.addItem
    ("Unoccupied 3-6 month/year");

    ShortList.WaterFireBurglary.WaterDamageOccupancy.addItem
    ("Unoccupied more than 6 month/year");

    break;

    case "7": <>

    ShortList.WaterFireBurglary.WaterDamageOccupancy.addItem
    ("Unoccupied 3-6 month/year");

    ShortList.WaterFireBurglary.WaterDamageOccupancy.addItem
    ("Unoccupied more than 6 month/year");

    break;

  • Change the caption of a drop-down list field

    Hi all

    I'm changing the legend of some field drop-down under certain conditions. The following is written on some other field drop-down list:

    If (this.rawValue == 'Ad Hoc payments')

    {    

    xfa.resolveNode ("form. PaymentDetails.ddlInvoiceFrequency.caption #text ") .rawValue group"TEST CAPTION";

    }

    But it seems to not work.

    Any help would be much appreciated.

    Thank you

    Vijay.

    Try with this:

    delete the caption in the palette of the subject field and type this in the case of change:

    If (xfa.event.newText is "Ad Hoc payments") this.caption.value.text.value = "TEST CAPTION";

  • Select the point in combobox/drop-down list, fields to update

    Hello

    I have a drop-down list. When a user makes a selection, I would like to query a database and return the results to be displayed in a form. Note, I don't want users to have to press a button, it should happen when an element is pressed. It sounds simple enough, but because I'm new, I'm fighting.

    I understand that I need to create a 'change' and then Manager in this handler, I need to run my t service get the data, but then when I try to access these data, nothing happens. I have to Bind something to the combobox? Here is my code.

    "" < s:ComboBox id = "lcidComboBox"change = "lcidComboBox_changeHandler (event)" labelField = "name" selectedItem ="bills.locn{}'> "

    " < s:AsyncListView list =" getLocationsResult.lastResult{}"/ > "

    < / s:ComboBox >

    protected function lcidComboBox_changeHandler(event:IndexChangeEvent):void

    {

    getLocationsResult.token = locationService.getLocations ();

    trace (locations.snam); <-this is not anything!

    }

    See you soon,.

    Brian

    OK, think about it. I needed to include a tag Binding then call my answering machine, the object is able to be called and I can view its properties.

    protected function lcidComboBox_changeHandler(event:IndexChangeEvent):void

    {

    getLocationsResult.token = locationService.getLocations ();

    snamTextInput.text = locations.snam;

    cuidTextInput.text = locations.cuid;

    }

  • Dynamic drop-down list

    I'm trying to create a dropdown menu with lets say groups that populate a second drop-down list with people in them. Can someone tell me please in the right direction for this?

    Here is an example that I set up for you. The code is on the output of the 1st DDList event. If you have many options in this list, you can watch a different code construct (select the in Javascript).

    Paul

Maybe you are looking for

  • When the 1.00 is not equal to 1.00

    OK, I tried to look around the forum for an answer, but wasn't really sure that a similar position can be attributed to the.  I have a request that I wrote which selects a purchase order based on the State of the device being sorted.  If there are se

  • How to rearrange the Launcher?

    I just took my pre yesterday, and I'm still learning my way around it. Also, if I can rearrange my favorites or they just automatically appear with recently added first?

  • BlackBerry 7 Webworks Documentation

    Hi guys Could someone point me in the direction of Blackberry 7 or earlier Webworks documentation. I had a quick glance, but I seem to keep coming back to the Blackberry Webworks 10 docs. See you soon Marcus

  • BlackBerry Smartphones BLACKBERRY 9320 CONTACTS

    Good evening I got Blackberry my wife because she has updated to a 9720. My problem is that when I go to contacts, it reflects his old contacts as well as mine and I just cannot remove their contact list. I went into the installation ID and ander, on

  • Photosmart 6520: Pass a printer ink cartridge to another

    I have two printers of the same model @ our two different houses.  I did this so that I can take them w / me, so they don't dry out. Im sure that black is not almost empty but left the impression. Can I change them & have printer to recognize ink lev