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.
I am attempting to insert different text options into a floating field based on a number selected in another drop down list - how do I accomplish this?
Solved! Go to Solution.
Views
Replies
Total Likes
You might want to put the code on the Change event of your dropdown list. And also you need to set the Binding of the dropdown list to "Specify Item Values" on the Binding tab of the Object palette - then each of your list items will be assigned a number for use in the script.
In the script you can add a separate "case" statement for each choice in the dropdown list - the case number corresponding to the value of the selection.
var selection = this.boundItem(xfa.event.newText);
switch (selection) { case "1": // Selection 1 TextField1.rawValue = "item1";
break; case "2": // Selection 2 TextField1.rawValue = "item2" break; }
In the script above you'll have to change "TextField1" to the name of the text box, you want the text to show up in.
Views
Replies
Total Likes
Is it an Adaptive form or a PDF form?
Views
Replies
Total Likes
Views
Replies
Total Likes
You might want to put the code on the Change event of your dropdown list. And also you need to set the Binding of the dropdown list to "Specify Item Values" on the Binding tab of the Object palette - then each of your list items will be assigned a number for use in the script.
In the script you can add a separate "case" statement for each choice in the dropdown list - the case number corresponding to the value of the selection.
var selection = this.boundItem(xfa.event.newText);
switch (selection) { case "1": // Selection 1 TextField1.rawValue = "item1";
break; case "2": // Selection 2 TextField1.rawValue = "item2" break; }
In the script above you'll have to change "TextField1" to the name of the text box, you want the text to show up in.
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies