Hi all,
I'm new to Adobe forms and also Javascript. I have been putting together field specific validation but need to expand this a bit and force users to update a series of fields within a given page based on valudes placed in another page. Please note that the user must save the form and email/publish.
This is what i'm trying to achieve in a 4 page form.
in Page 1
if field a=yes
then
set focus on page 4
require users to fill out page 4 (field x,y,z)
then they are free to update any other elements in the form.
I thought maybe on the File-save I could enforce this...
any help is greatly appreciated.
The term "set focus" has a specific meaning, namely to activate a specific field. So, you could set focus on the first field to be filled on that page 4. You also can do it very simply and go to page 4 by setting the pageNum to 3 (note Acrobat starts page numbering with 0).
Assumed field a is a checkbox, you would put the following code into the MouseUp action:
if (event.target.value == "Yes") {
this.pageNum = 3 ;
}
and that would get you to page 4
or you would use
if (event.target.value == "Yes") {
this.getFielc("mytargetfield").setFocus() ;
}
and that would get you to the field named "mytargetfield"
Hope this can help.