I created a form in LiveCycle and when I go to test it out in PDF form after saving the document and then opening it back up some of the text is gone. One part in particular, I have a drop down and based on the selection the static text box is populated and every thing looks good, but when I save, close and reopen the PDF the static text is missing. What am I doing wrong? Please help, thanks!
Solved! Go to Solution.
Views
Replies
Total Likes
Hi,
The exit event is a good one when working with dropdowns.
In the first instance let's say that in the Object > Binding palettte you do not have the Specify values ticked. If the dropdown is Yes (show the object) and No (hide the object), then the following JavaScript in the exit event should work:
if (this.rawValue == "Yes") {
TextObject.presence = "visible";
}
else {
TextObject.presence = "hidden";
}
If you have Specified values in the Object > Binding palette, then let's say Yes=1 and No=0, the script would look like:
if (this.rawValue == 1) {
TextObject.presence = "visible";
}
else {
TextObject.presence = "hidden";
}
You will need to make sure that you are referencing the text object correctly, in particular if it is separated by subforms from the dropdown.
Does that help?
Niall
Views
Replies
Total Likes
Hi,
I suspect that you need to go into the File > Form Properties > Defaults tab and for the Preserve Script Changes, set the radio button to Automatic.
This will preserve the changes to the text object.
Hope that helps,
Niall
Views
Replies
Total Likes
It didn't seem to work. I guess what I'm trying to do and not sure it's possible, but I'm trying to use javascript in the layout:ready event in a flowable layout. Can this be done correctly? My presence scripts isn't working when the document is saved and then reopened where there is flowable content.
Views
Replies
Total Likes
Hi,
The layout:ready event may not be the best one to choose. What is driving the presence of the object? Is it a choice that a user makes?
If I know that I could advise a better event to place the script.
Niall
Views
Replies
Total Likes
Yes, it's usually a drop down that drives the presence scripts based on user choice. I also tried the exit event but I can't get that to work either.
Views
Replies
Total Likes
Hi,
The exit event is a good one when working with dropdowns.
In the first instance let's say that in the Object > Binding palettte you do not have the Specify values ticked. If the dropdown is Yes (show the object) and No (hide the object), then the following JavaScript in the exit event should work:
if (this.rawValue == "Yes") {
TextObject.presence = "visible";
}
else {
TextObject.presence = "hidden";
}
If you have Specified values in the Object > Binding palette, then let's say Yes=1 and No=0, the script would look like:
if (this.rawValue == 1) {
TextObject.presence = "visible";
}
else {
TextObject.presence = "hidden";
}
You will need to make sure that you are referencing the text object correctly, in particular if it is separated by subforms from the dropdown.
Does that help?
Niall
Views
Replies
Total Likes
okay so this works but after saving the document, closing it and then opening it up again objects are missing. So say like the drop down "yes" is selected and the text box enter name and enter address appear and the user puts in the information. The document is then saved and closed out. When its reopened the name and address text boxes are gone, but the drop down "yes" is still selected. Also when the user reselects "yes" the name and address boxes reappear but with the information that was previously entered. Hope this makes sense. Am I missing something?
Views
Replies
Total Likes
My bad operator error on my part. I got it to work now. Thank you so much for your help!! I can go home feeling complete now LOL!
Views
Replies
Total Likes
Hi,
Check is there other script that is controlling the presence of the name and address textfields. Maybe some legacy script in the layout:ready event, the docReady event or the initialise event?
I suspect that this is what the problem is. Now that you have the dropdown exit script working, you don't need any other script.
Hope that works,
Niall
PS - Great
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies