Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Setting for as invalid


Level 4

is there a way i can set a form as invalid with script.

when i return false from my initialize event, on submit button, the form seems to gothrough anyway.

is there a build in function i can use?

4 Replies


Not applicable
On the "Click" event, you can have a script like this

if (SomeObject.rawValue != "something you want")


app.alert("Can't submit");



let me know if this works


Level 4
it still attempts to send the document with the exit;

basically, becuase there is no validation for the checkboxes, i'm doing it manually on the validate event in the submit button via javascript.

my logic is this:

- if the rest of the form is valid aka all required fields are filled in, check for the check boxes (this works)

- if the check boxes are all empty - show a message and don't submit (this is the part where it keeps submitting, no matter if i return true or false)

i'm confused. please help 😞

my submit button (validate event) looks like this:

if (myscripts.validateForm())

{"returned true - submit form")



{"returned false - display error and exit")



the value i'm getting from validateForm (true or false) is correct.


Level 4
oh, and after putting exit; in, i get a javascript error back saying "exit is not defined"


Not applicable
Have you saved you form as a "Adobe Dynamic XML" ?

Make sure you have chosen the language JavaScript and not FormCalc.