I am relatively new to LiveCycle. A couple of questions:
1) I can readily show and hide subforms based on a radio button list selection (one click). When I use the same (or similar) script in conjunction with a drop down box, I need to make the same selection twice before the proper subform appears (and the "improper" subform disappears). The script, under change events, looks like this:
if(this.rawValue ==1) then
WaiverSubform.presence= "invisible";
ChangeSubform.presence= "visible";
elseif(this.rawValue ==2) then
WaiverSubform.presence= "visible";
ChangeSubform.presence= "invisible";
endif
As mentioned, it works w/ one click of a radio button but drop down list selections have to be made twice. Any help?
2) Also under the change events, I am attempting to reset the same subforms if a form filler has entered data then has a change of mind, backs up, and makes an alternate selection which causes the subform to be invisible and brings up an alternate subform. What ends up happening is the entire form is reset (at least I am not getting the error messages). I am setting variables and using the xfa.host.resetData script. Any help on this one would be appreciated as well.
Solved! Go to Solution.
Views
Replies
Total Likes
Larry,
1) Try moving the script to the drop-down exit event.
2) xfa.host.ResetData effects the entire form. You will have to reset each individual rawValue to achieve your objective.
Steve
Views
Replies
Total Likes
Larry,
1) Try moving the script to the drop-down exit event.
2) xfa.host.ResetData effects the entire form. You will have to reset each individual rawValue to achieve your objective.
Steve
Views
Replies
Total Likes
Steve,
1) Moving the script to the drop-down exit event did the trick. Thank you.
2) With regard to the resetting of subform data, I am trying to mimic the script shown on "SubformResetValues.pdf" found on the Adobe LiveCycle Developer site (http://www.adobe.com/devnet/livecycle/designer_scripting_samples.html). Instead of linking the script to the "clear" button (as shown in the sample), I am including it under the change event of the choice object that drives the appearance (or disappearance) of the subform. As mentioned, I am new to this but will keep trying. What would the script look like for resetting each individual rawValue?
Thanks again,
Larry B
Views
Replies
Total Likes
I'm sorry. My mistake. I did not know you could pass parameters to the xfa.host.resetData() to effect specific subforms. Nice.
Values can be reset by setting the rawValue to "", for example,
form1.page1.subform1.firstName.rawValue = "";
In other cases the default may a specific value. For example, if a radio button is supposed to be on by default and the 'on' value is 1, you would set the rawValue to "1".
Views
Replies
Total Likes
Hi guys i need some help, i have a some subForms that i want to manipulate with a dropdown list, and i've tried to do this with this code in the exit event,
if(this.rawValue ==1) {
xfa.resolveNode("form1.theForm.subForm1").presence= "invisible";
xfa.resolveNode("form1.theForm.subForm2").presence= "visible";
}
else if(this.rawValue ==2){
xfa.resolveNode("form1.theForm.subForm3").presence= "visible";
xfa.resolveNode("form1.theForm.subForm4").presence= "invisible";
}
This is not working. The subforms are not working. I think that here if(this.rawValue ==1), the number, is the position of the list that i inserted in the drop down list object. Am i correct?
If someone can help i would apreciate.
I am also attaching the file.
Thanks.
Regards
Mancini.
Views
Replies
Total Likes
The value that is being reported in the dropdown is the value that is shown on the screen. If you add an app.alert(this.rawValue) before the if statement you will see what is being returned. When I modified your code to look for "one" it worked fine.
paul
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies