This conversation has been locked due to inactivity. Please create a new post.
This conversation has been locked due to inactivity. Please create a new post.
Follow-up from issue:
http://forums.adobe.com/message/2417876#2417876
I have 2 drop-down lists... "Department" and "SubDepartment"
The selection in DDlist "Department" spawns a unique list in DDlist "SubDepartment"
I select the proper items from both DDlists.
When I do this, I want read-only text field "NameOnIDBadge" to be populated with a pre-defined entry.
Example:
In "Department" DDlist, select item "Finance & Administration"
In "SubDepartment" DDlist, select item "Food Service" from the list that appears
THEN:
In read-only text field "NameOnIDBadge" the following predefined read-only text appears: "Contract Food Serv."
(Thanks to Paul, I already know how to make the selection in DDlist "Department" affect the selection list in DDlist "SubDepartment"
but I don't know how to make the selection of both DDlists create a new pre-defined entry in a text field.)
I have attached a mockup of the file I am working with...
Solved! Go to Solution.
Views
Replies
Total Likes
if ((firstDDList.rawValue="Whatever") && (secondDDList.rawValue = "Whatever"))
yourTextBox.rawValue="the right text"
this code would go under the second DDList Exit event, replace the code i put in there to add the check of the first DDList
Views
Replies
Total Likes
yourtextBox.rawValue="Contract Food Serv."
see attached
Views
Replies
Total Likes
I tried that but a few things went wrong.
1. After I select "Food Service" in the second "SubDepartment" DDlist, a Javascript error message pops up (see attached), and I have to click it to make it go away. Then the text "Contract Food Serv" appears in the text box.
2. If I select a different value in the Department DDlist, the rawtext still remains in place... it should clear out.
3. The raw text seems to be based on the selection of the SubDepartment DDlist only. However, I need specific raw text to be generated based on the combination of BOTH DDlists. (It could happen that a totally different Department DDlist could have the same item in its corresponding SubDepartment DDlist. In that case, the rawtext would be completely different.)
Correct example:
Department DDlist = Finance & Administration
SubDepartment DDlist = Food Service
NameOnIDBadge = Contract Food Serv <-- CORRECT
Incorrect example:
Department DDlist = Clinical Services
SubDepartment DDlist = Food Service
NameOnIDBadge = Contract Food Serv <-- INCORRECT (it might be something else)
Views
Replies
Total Likes
its not an error message, its a pop up i've put in place to check what's selected, and to make sure the logic works corrently, you can remove it from code.
to clear the text, put
yourtextboxname.rawValue = ""
on the exit event of the first drop down, etc.
have you looked at the code at all?
Thank you for your response.
I am a novice at learning code at this point, but yes I did look at it.
The issue still remains that the rawtext is triggered by the selection from the second SubDepartment DDlist only... not based on the combination of both DDlists.
Views
Replies
Total Likes
if ((firstDDList.rawValue="Whatever") && (secondDDList.rawValue = "Whatever"))
yourTextBox.rawValue="the right text"
this code would go under the second DDList Exit event, replace the code i put in there to add the check of the first DDList
Views
Replies
Total Likes
Excellent!
I'll redo it and test... and post back.
Thank you!
Views
Replies
Total Likes
Thank you for pointing me in the right direction.
The only changes I had to make was to add a double "==" in the scripting for the selections from the 2 DDlists.
(Using a single "=" would cause things to not work properly.)
if ((firstDDList.rawValue=="Whatever") && (secondDDList.rawValue=="Whatever"))
yourTextBox.rawValue="the right text"
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies