Skip to main content
Inspiring
January 18, 2024
Answered

Stopping a submission

  • January 18, 2024
  • 1 reply
  • 557 views

Here is a segment of a fillable form I've created.

 It is necessary for the user to use the check boxes to select three days. I have a piece of javascript that that creats an alert unless exactly three days have been selected. The problem I have is that I cannot stop the form from being submitted. It is not like I can make the fields required, because at any time two of the checkboxes will be blank.

So how do I stop the submission?

Thanks - Jack

This topic has been closed for replies.
Correct answer Jack157F

I will try it an report back.

1 reply

try67
Community Expert
Community Expert
January 18, 2024

You have to do the submit command in your code, not as a separate action.

Something like this:

 

if (conditionA) { this.mailDoc({cTo: "me@server.com"}); }

else { app.alert("You must first selected three days."); }

Jack157FAuthorCorrect answer
Inspiring
January 18, 2024

I will try it an report back.