Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Check all required forms on a page, then check checkbox

Avatar

Not applicable
I was wondering how i can do the following.



b I got the following:

I got a PDF document with different pages (about 16 pages). On every page are required and non-required fields. In the Master Page i've made a sidepanel with pagetitles. Each pagetitle has his own checkbox next to it.



b I want do the following:

I wanna check on every page individually if the required fields are filled in. When the required fields are filled in, then check on the checkbox at the pagetitle belonging to the page you filled in. If not, check off the checkbox.



I'm searching for days now on the whole internet, but i can't find any information to do this.



Hopefully you can help me with this.



thank you
0 Replies

Avatar

Not applicable
No one here who know how i can do this??

Avatar

Level 6
Rob,



Use the execValidate function from the context of the subform that you're checking. So, if your form is called "form1" and the subform you want to check is "Page1", this JavaScript will return "true" if all validations for objects on that subform are successful. This includes mandatory fields.



xfa.form.form1.Page1.execValidate());



Jared

Avatar

Not applicable
Thanks Jared,



I'm gonna try that

Avatar

Not applicable
I don't think i understand it well 😞



I got the following:



My checkbox:

form1.#pageSet[0].Page1.Subform1.CheckBox1[0]::validate: - (JavaScript, client)



code:

if (xfa.form1.#subform[2].page1.execValidate() returns true){

form1.#pageSet[0].Page1.Subform1.CheckBox1[0].rawValue = 1;}

else {

form1.#pageSet[0].Page1.Subform1.CheckBox1[0].rawValue = 0;}



I want that if that all required fields on page 1 returns true the checkbox will be checked.



(I'm a newbie to Livecycle/javascript)