I have looked at the site and can get the population of the text field, but I also need to hide a portion of the form is a certain selection is made.
For example, I have a form that has a drop down list that allows the user to select a sport. Using that data, I populate 2 text fields on 2 different pages to distrubute the name of the sport. The 2 text fields are Sport1 and Sport2.
This information is in the change function of the ddlist.
Sport1.rawValue = xfa.event.newText;
Page2.Sport2.rawValue = xfa.event.newText;
If the user selects option 2 in the drop down list, I would like to hide a portion of the form, "Division." I have tried many different things such as putting the follwing in the change and exit scripts of the ddlist.
var selsport = this.boundItem(xfa.event.newText);
switch (selsport)
{
case "2": // hide division
division.presence="invisible";
break;
default: // unknown value -- do nothing
break;
}
Any help will be appreciated. I can post a condensed file that I am currently working on if that helps, but I don't see where I can add it.
Views
Replies
Total Likes
Place it in the exit event of the ddlist.
I am assuming the value of the 2nd option in the dropdown is "2". If not, better place a messagebox and see what value is being passed..
xfa.host.messageBox(""+ this.rawValue);
var selsport = this.rawValue;
switch (selsport)
{
case "2": // hide division
division.presence="invisible";
break;
default: // unknown value -- do nothing
break;
}
If you still have issues, send the file to LiveCycle9@gmail.com, so I can have a look at it.
Thanks
Srini
Views
Replies
Total Likes
Joshua,
In the exit event of the dropdown, you have used "*" on either side of the rawValue..You need to remove this for your code to work.
var selsport = this.rawValue;
Thanks
Srini
Views
Replies
Total Likes
Srini --
Thank you so much for this. I guess I didn't notice what you told me earlier. Thank you for your patience.
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies