I created a simple form that uses javascript to hide or display subforms based on the selection from a drop down menu. Everything was working fine. When I integrated the dropdown and subforms into an existing form, the subforms no longer display on DropDownList1::change. The code looks like:
form1.subform1.DropDownList1::change - (JavaScript, client)
if(xfa.event.newText == 'C&M Crew Metro'){
sub1.presence = "visible";
sub2.presence = "hidden";
sub4.presence = "hidden";
sub5.presence = "hidden";
sub6.presence = "hidden";
sub7.presence = "hidden";
sub8.presence = "hidden";
sub9.presence = "hidden";
}
The only other coded object on the form is a reset form button, which works. I've triple checked my syntax and whatnot and can't find anything. Any ideas?
david mcchesney
IT Analyst
NMGCO
david dot mcchesney at nmgco.com
Solved! Go to Solution.
Views
Replies
Total Likes
Did you save the form as dynamic?
Are you getting errors in the java console (ctrl - J in Acrobat)?
Paul
Views
Replies
Total Likes
Try using the fully qualified path for the Subform.. Sometimes, the form may be confused with the similar name fields..
For example:
form1.Page1.sub1.presence = "visible";
You can place the cursor int he Script Editor and then press CTRL+ SHIFT buttons and click on the field.. This will give you the absolute path for the field.
Thanks
Srini
Views
Replies
Total Likes
Thanks for the quick reply. I did try the fully qualified names, and it's still not working. Here's a visual example. The subforms display under the dropdown, based on the dropdown selection.
Views
Replies
Total Likes
Did you save the form as dynamic?
Are you getting errors in the java console (ctrl - J in Acrobat)?
Paul
Views
Replies
Total Likes
Gah. I feel like an idiot. The form creator hadn't saved the form as dynamic. My bad. Thanks!
Views
Replies
Total Likes
Views
Likes
Replies