Dropdown value will come from two text fields (TextField1+TextField2), intigrating one value of dropdown.
And also TextField1 and TestField2 will increase by clicking on add row button.
In this case how can I get code?
Solved! Go to Solution.
Views
Replies
Total Likes
Hi
In the preOpen event of your dropdown you can add the items to your dropdown with the following code;
var dropdownitems = [];
var rows = xfa.resolveNodes("Row[*]");
for (var i = 0; i < rows.length; i++)
{
dropdownitems.push(rows.item(i).TextField1.rawValue + " " + rows.item(i).TextField2.rawValue);
dropdownitems.push(rows.item(i).index);
}
this.setItems(dropdownitems.join(","), 2);
This assumes the text fields are called TextField1 and TextField2 are in repeating subform called “Row”.
The value of the dropdown will become the index of the row containing the text fields.
This assumes your users are using Reader 9.0 or above. If not you will have to do something similar but the with clearItems and addItem methods.
Regards
Bruce
Views
Replies
Total Likes
Hi,
There are a couple of issues. (1) scripting the items in the dropdown. (2) looping through the repeating instances.
I can't get to LCD Designer at the moment but have a look at this: http://assure.ly/jcTahK.
I "think" this might also help: http://assure.ly/rwvJxM.
Niall
Views
Replies
Total Likes
Thanks for your kind help.
Actually I want dropdown value will be depended on textField. User will type in text field. So dreopdown value is variable.
DropDown value = TextField1+Textfield2.
How can I do this?
Views
Replies
Total Likes
Hi
In the preOpen event of your dropdown you can add the items to your dropdown with the following code;
var dropdownitems = [];
var rows = xfa.resolveNodes("Row[*]");
for (var i = 0; i < rows.length; i++)
{
dropdownitems.push(rows.item(i).TextField1.rawValue + " " + rows.item(i).TextField2.rawValue);
dropdownitems.push(rows.item(i).index);
}
this.setItems(dropdownitems.join(","), 2);
This assumes the text fields are called TextField1 and TextField2 are in repeating subform called “Row”.
The value of the dropdown will become the index of the row containing the text fields.
This assumes your users are using Reader 9.0 or above. If not you will have to do something similar but the with clearItems and addItem methods.
Regards
Bruce
Views
Replies
Total Likes
I just created a sample PDF for you. Share your email with me: nithiyanandam.dharmadass@igatepatni.com
Nith
Views
Replies
Total Likes
Hi Bruce,
Thanks a lot. I wanted exactly this.
Views
Replies
Total Likes
Hi Nith,
Created a sample. Great! I have got answer.
Thanks again, Nith.
Views
Replies
Total Likes