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

Adobe Summit 2023 [19th to 23rd March, Las Vegas and Virtual] | Complete AEM Session & Lab list



Level 3

I'm trying to build in a condition in my Submit button that says if a given selection is No, the user can't Submit.

So it goes something like this:

if(form1.Pg2.RecoSF.RecoSSF.RecoAnswer.rawValue == 2)
{"Recommendation has been declined by Dept Manager.  Form cannot be submitted at this stage.","Recommendation declined",3,1);
    xfa.event.cancelAction == 1;

It displays the message, but it redisplays it about 5 times before it finally comes up with 'Submit Cancelled'.

Can anyone help me with the right script to do this?



2 Replies


Level 3

PS:  The event I used was 'preSubmit'


Level 9

Hi Peta,

Instead of writing xfa.event.cancelAction == 1 . Write xfa.event.cancelAction = 1 as in the previous statement you check the value where in the later you assign the value .