You can provide a means to copy the selected value into a textbox, and the text box could have one of more previous selections. Exactly what have you tried so far. It would be helpful to know how you've tried to set this up and what script you've tried.
Thanks for taking the time out to reply to my post,
I'm not to worried about making 2 selections from a dropdown box, at the moment I can't even do one.
I've a drop down box called "Entrance barrier 1", in the drop downbox box I have 4 or 5 drop downs.
When I select one of the drop downs I would like it to copy to a text box called "extra site hazards".
I've created my form on Adobe acrobat pro11.
trying to do using my names? I'm a new to java so it's baby steps for me! Once my forms completed I'm using my
Andriod phone to fill out my form using a mobile version of Adobe. Would this change my script?
Many thanks in advance.
The example provided will populate if one item is selected or multiple items are selected.
Since mobile devices depend upon apps and not full programs and apps do not have all the features that a full program has, you will have to test the form on a computer and the mobile device so you can tell if the code works in a full support environment and then if it will work in a limited environment. Also apps are constantly be updated so there is no way to tell when support for some feature has been added.
The simplest way is to put a calculation in then text box to set the text box equal to the drop down box.
event.value = "";
var oField = this.getField("Entrance barrier 1");
event.value = oField.value;
The example code will work with a combobox or listbox and the linked code will work with both types of fields, but only the listbox allows multiple selections.
When the script is in the text box, one needs to exit the combobox or listbox for it to take effect.
Thanks for your reply,
I'll give it ago and let you know.
I've given the script a try and I have some progress! Nearly.
The only way I can get the script to take affect is by entering it in the Custom format script box, is this correct? When I do attempt to select a drop down item, it only appears to copy over the same drop down item in to the text box, regardless of selection.
When I attempt to write in the text box after making this selection the drop down text disappears out of the text box.
Thanks for your patients
It will work in the custom calculation field, but you need to exit the combo box after the selection for the change to take effect.
You can also use the custom key stroke but you need to do more setting of properties to have the selection take effect immediately.
Thanks very much for your help. That scrip worked as I wanted and it works on my mobile device, which is what I wanted.