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

Validation running twice

Thomas_McConnac
Level 4
Level 4
Hi all,



To set my problem into context, this is the order of events:



-Choose an option, makes field visible

-Fill field in with data

-Press button which:

-Checks which fields should be mandatory, and makes them so

-Runs execValidate()

-Hides parent subform and makes next parent subform visible

-Go back to previous parent subform

-Delete data from field

-Press button which:

-Checks which fields should be mandatory, and makes them so

-Runs execValidate()

-Doesn't change subform



However, the second time around it is running the validation script twice and displaying my message "The field XXX is mandatory and has not been completed" twice.



Any ideas why this is hapenning?



Many thanks,



Tom
3 Replies
pguerett
Level 10
Level 10
Are you invoking the execValidate on the individual field or on the subform that contains the field or on the entire form? These types of things are difficult unless we can see the context that things are running in. If you post your form to livecycle8@gmail.com I can have a look and see if there is something I can see that would be causing this.
Thomas_McConnac
Level 4
Level 4
I'm invoking it on the subform that is visible, so one step down from the entire form.



Will send it in about 5 mins.



You're still a star as always Paul 🙂



Tom