Hi,
I have a simple form having 1 Checkbox (Default Unchecked) and 1 Textfield. Both are in separate sub-forms. I am trying to make presence of TextField visible when the checkbox is checked. Script is working fine for Checkbox change event but not for Docready event.
Can see the pdf form here: http://dl.dropbox.com/u/5141935/ErrorInVisibility.pdf
Snapshot:
I have also checked the same on form's ready, layout ready event...(just for hit & trial) but not working with either.
There is a big version of form it's just a boiled down version of problem.
Pls tell what I am doing wrong !!
Thanks.
-
Abhinav
Solved! Go to Solution.
Views
Replies
Total Likes
Hi,
Here is the form back: https://acrobat.com/#d=lVnQIhP4B4t0A-N9prn4hQ
I would use the click event of the checkbox for changing the visibility of the subform. Then in the docReady event of the checkbox you can fire the script in the click event.
At design time you can also set the presence of the subform to hidden/invisible. This way you would not need the script in the docReady event.
Hope that helps,
Niall
Views
Replies
Total Likes
Hi,
Here is the form back: https://acrobat.com/#d=lVnQIhP4B4t0A-N9prn4hQ
I would use the click event of the checkbox for changing the visibility of the subform. Then in the docReady event of the checkbox you can fire the script in the click event.
At design time you can also set the presence of the subform to hidden/invisible. This way you would not need the script in the docReady event.
Hope that helps,
Niall
Views
Replies
Total Likes
Thanks a lot.
I have to deploy this form on LC ES2 and in process checkbox selection will be coming from XML Form data, So I must have to check it at docReady.
Can you tell me what is the difference between Form's docReady Vs CheckBox's docReady? As I think Form's docReady should fire when complete form is rendered ! Am I wrong?
Thanks.
-
Abhinav
Views
Replies
Total Likes
Hi Abhinav,
The docReady event is the last event to fire once the form is rendered and the data merged. It's a great event as it fires only once.
I would have said that there was no difference between script in the docReady event of the checkbox and the docReady event of the root node. The checkbox docReady event also fires once the form is fully rendered.
The docReady event is an application event and all objects with script in this event fire pretty much at the same time. I am not aware of any priority or sequence for objects in the hierarchy. In any case there can only be milliseconds in the difference.
Good luck,
Niall
Views
Likes
Replies