Expand my Community achievements bar.

Learn about Edge Delivery Services in upcoming GEM session
SOLVED

How can I prevent saving a form if there are required items empty?

Avatar

Level 1

I have a form which has both text fields and drop downs that are required to fill out.  The problem is people can still save the document even though the required items are left blank.  How can I prevent someone from saving the form and not leave any of those requirements blank?

 

1 Accepted Solution

Avatar

Correct answer by
Employee Advisor

@Gotterkraft 

Ideally, when you set the form objects as Required i.e "Type: User entered required" in a PDF Form then ideally, the user won't be able to submit the form without filling the required fields.

In your case, if this is a requirement then you can put your validation code[0] on preSave event to warn the user that the form is not complete. Please be informed that this may just notify them if there are any missing fields, not stop them from saving.

Just another tip, all required fields are marked as <validate nullTest="error"/> in the XML source.

 

[0]- 

Page1.execValidate();

 

View solution in original post

1 Reply

Avatar

Correct answer by
Employee Advisor

@Gotterkraft 

Ideally, when you set the form objects as Required i.e "Type: User entered required" in a PDF Form then ideally, the user won't be able to submit the form without filling the required fields.

In your case, if this is a requirement then you can put your validation code[0] on preSave event to warn the user that the form is not complete. Please be informed that this may just notify them if there are any missing fields, not stop them from saving.

Just another tip, all required fields are marked as <validate nullTest="error"/> in the XML source.

 

[0]- 

Page1.execValidate();