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
BedrockMission!

Learn More

View all

Sign in to view all badges

How can you ensure all mandatory fields are filled, before pressing the submit button?

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

28-11-2008

Hi all,



I've got a complex form with many different pages (17 so far) and I'm using visible/hidden to change the layout so only 1 page appears at a time.



What I want to do is have a better check for what mandatory fields have not been filled out in my form. The submit buttons checks that all of the mandatory fields have been completed, but if that's 1 field on page 1, searching through my entire document would cause the users to lose the will to live!



I am after either returning more meaningful information to the user when a submit fails, or being able to run the mandatory check field every time the page changes. I already dynamically set most of the mandatory fields according to what is/isn't visible so adapting my form wouldn't take long but I have no idea how to get it to check if all the fields have been filled in.



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

28-11-2008

On the turn of a page force the validations to fire for that page. You can use the form1.Page1.execValidate(). This will cause all validate scripts to run on Page 1.

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

28-11-2008

Ahah, many thanks Paul.



You're a star as always!

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

03-12-2008

Right, I have pretty much all of my validations working now... and here's the word you're waiting for... but, I am having a problem with fields that are already visible when the rest of the layout changes.



Basically, one of the options above the field with the problem is being changed, which makes the layout above that field change. This is triggering the validate event.



This wouldn't stop anyone using my form, but it is an annoyance.



Anyone able to help?



Many thanks,



Tom