Let me start off by saying Thank YOU for anyone who replies! I am in dire need of this to work LOL.
Additionally; yes - I have looked at the tutorial where one combo box populates another; however that is much more complex than I need. I have tried multiple times to modify / make the script my own only to have an issue come up that I cannot seem to fix or find the solution I need online.
In short: I need to make two combo boxes where the second one is populated based on the selection made on the first. This must be manual - No SQL database linking etc...everything must live in the form through javascripting.
Example:
Combo Box 1 has the following items listed
Product Family1
Product Family2
Product Family3
Other
Combo Box 2 will be populated with a list based on the selection of the first.
MY ISSUE:
In testing the functions in adobe they work fine. I am uploading this form into a separate program for use as an electronic form. When the user makes a selection on combo box one, combo box two is populated with the correct list. I make the selection in combo box two and all appears well. I submit the form for review. On that approval step the value on combo box 2 is not what the value originally selected it is the hyphen at the top of the list. For some reason the value is not stickin on the second combo box.
I loaded the tutorial form:
http://www.windjack.com/PDFSamples/ListPrograming_Part1_AcroForm.pdf
To verify it was not the software that was causing my issue. That form works fine.
DOCUMENT LEVEL JAVASCRIPT ( I Call for the SetEntries function as a custom keystroke script on combo box 1):
var xProducts = {
ProductFamily1:
[
["-"],
["Product 1"],
["Product 2"],
["Product 3"],
ProductFamily2:
[
["-"],
["Product 4 "],
["Product 5"],
["Product 6"],
ProductFamily3:
[
["-"],
["Product 7 "],
["Product 8"],
["Product 9"],
Other:
[
["Other"]
]
};
function SetEntries()
{
// Only run this code on when the selection is commited.
if(event.willCommit)
{
var lst = xProducts[event.value];
if( (lst != null) && (lst.length > 0) )
this.getField("combobox2").setItems(lst);
else
this.getField("combobox2").clearItems();
}
}
- AcrobatUsers Community Expert - Contact me personally at try6767 [at] gmail [dot] com
Check out my custom-made scripts website: http://try67.blogspot.com