Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.
SOLVED

preSubmit code

Avatar

Former Community Member

Hi There all,  I have created some code to verify if a field in my PDF has been populated  on a preSubmit event of a button.  If the field is not filled in I have created a message box to pop up and this works fine.   The problem is that the submission does not stop if that field is empty. How can I do this??  Thanks  Joey

1 Accepted Solution

Avatar

Correct answer by
Level 10

Hi Joey,

You could make the field mandatory/required (see Object > Value palette). Depending on how you have set up your submit button it will not proceed with submission if field is null.

There is a new method called cancelAction, which can be used specifically to cancel the submission. However you need to set the target version to Acrobat/Reader v9.1 in the File > Form Properties > Defaults tab and the users will need to use this version of Acrobat/Reader.

Check out some of the email submission solutions here: http://assure.ly/eUR4wJ.

Hope that helps,

Niall

View solution in original post

2 Replies

Avatar

Correct answer by
Level 10

Hi Joey,

You could make the field mandatory/required (see Object > Value palette). Depending on how you have set up your submit button it will not proceed with submission if field is null.

There is a new method called cancelAction, which can be used specifically to cancel the submission. However you need to set the target version to Acrobat/Reader v9.1 in the File > Form Properties > Defaults tab and the users will need to use this version of Acrobat/Reader.

Check out some of the email submission solutions here: http://assure.ly/eUR4wJ.

Hope that helps,

Niall

Avatar

Former Community Member

Hi Niall,  Thanks for the help. I have used the cancelAction method in the button  as it was the easiest and quickest to implement.  Regards  Joey