These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

check for required fields prior to submission

inosent
Registered: Jun 13 2009
Posts: 10

hi

i have a pdf form with a few fields that need to be filled in.

once the form is filled in, the user clicks a submit button and this emails the fdf file.

what is the javascript to check to see if a required field is filled in, and if not, upon clicking the submit button, a not pops up that says "the "X" filed is not filled in yet" etc, and then the form goes right to that filed for the user to fill it in?

thanks

gkaiseril
Online
Expert
Registered: Feb 23 2006
Posts: 4308
The "required" property works when the form is submitted to a web based script page, but many prefer to check the field for the required fields and use a more meaningful message.

You will need to check all form field except the 'button' type of field for the required property and make sure there is a response in each of the required fields. Some of the check will be dependent upon you default values and if these default values are acceptable or not for submission.

[url=http://www.acrobatusers.com/forums/aucbb/viewtopic.php?id=20784]How to detect "required" field property in form?[/url]

George Kaiser