Skip to main content
Participant
June 19, 2023
Question

Mandatory check box before form submission

  • June 19, 2023
  • 1 reply
  • 575 views

Hello!

 

I have a PDF form that clients will fill out with their details. 

A checkbox is required to be checked to agree to the terms and conditions. Finally, a send button that submits the form to an email address. Currently, the submit button negates the checkbox.

 

I know that some javascript is required for this to work as intended. I've gone through multiple forums to find the correct scripting but I've had no luck getting this to work.

 

Ideally, it needs to check the form to make sure that this checkbox is checked, if not a message pops up, if checked it will submit the form.

 

Thanks in advance

This topic has been closed for replies.

1 reply

Nesa Nurani
Community Expert
Community Expert
June 20, 2023

Do you use a built-in submit function or a script to submit the form?

You can use script, first check that checkbox is checked if yes submit form if not give alert.

Here is an example how to use script:

https://acrobatusers.com/tutorials/submitting-data/ 

Phil NZAuthor
Participant
June 25, 2023

Yes I was using the inbuilt submit function. I manged to get it to work using ChatGPT to write me the correct javascript.