


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)
{
xfa.host.messageBox("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?
Thanks,
Peta
Views
Replies
Sign in to like this content
Total Likes
PS: The event I used was 'preSubmit'
Views
Replies
Sign in to like this content
Total Likes
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 .
Thanks,
Bibhu.
Views
Replies
Sign in to like this content
Total Likes