Validation running twice

Avatar

Avatar
Boost 1
Level 4
Thomas_McConnac
Level 4

Likes

2 likes

Total Posts

134 posts

Correct reply

0 solutions
Top badges earned
Boost 1
View profile

Avatar
Boost 1
Level 4
Thomas_McConnac
Level 4

Likes

2 likes

Total Posts

134 posts

Correct reply

0 solutions
Top badges earned
Boost 1
View profile
Thomas_McConnac
Level 4

09-12-2008

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

Replies

Avatar

Avatar
Boost 500
Level 10
pguerett
Level 10

Likes

612 likes

Total Posts

7,689 posts

Correct reply

692 solutions
Top badges earned
Boost 500
Boost 50
Boost 5
Boost 3
Boost 250
View profile

Avatar
Boost 500
Level 10
pguerett
Level 10

Likes

612 likes

Total Posts

7,689 posts

Correct reply

692 solutions
Top badges earned
Boost 500
Boost 50
Boost 5
Boost 3
Boost 250
View profile
pguerett
Level 10

09-12-2008

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.

Avatar

Avatar
Boost 1
Level 4
Thomas_McConnac
Level 4

Likes

2 likes

Total Posts

134 posts

Correct reply

0 solutions
Top badges earned
Boost 1
View profile

Avatar
Boost 1
Level 4
Thomas_McConnac
Level 4

Likes

2 likes

Total Posts

134 posts

Correct reply

0 solutions
Top badges earned
Boost 1
View profile
Thomas_McConnac
Level 4

09-12-2008

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

Avatar

Avatar
Boost 1
Level 4
Thomas_McConnac
Level 4

Likes

2 likes

Total Posts

134 posts

Correct reply

0 solutions
Top badges earned
Boost 1
View profile

Avatar
Boost 1
Level 4
Thomas_McConnac
Level 4

Likes

2 likes

Total Posts

134 posts

Correct reply

0 solutions
Top badges earned
Boost 1
View profile
Thomas_McConnac
Level 4

09-12-2008

Sent it.