Expand my Community achievements bar.

How to cancelling email submission after user clicks "yes/no" button of message box?

Avatar

Former Community Member
could some one tell me, how can i cancelling the submission event after one user clicks "yes/no" button of message box? The scenario is the following:



After data input in a dynamic form clicks the user send mail button. Before the email submit, the user has to decide going back to the form and validate the input or continuing to submit email.



In case of going back to validate input the submission event must not solve. So, how can i implemente it in java and/or form calc script?



Thanks so much for your help in advance and i am very glad to hearing from you soon!



Djinges
2 Replies

Avatar

Former Community Member
Hello,



The most easy way to solve your problem is to add two buttons, the first should be regular button and the second is submit by e-mail one. Set the

'presence' property of the second to 'hidden' and add to it your email address. To the first button on 'click' event add the script like this



form1.#subform[0].Button1::click - (JavaScript, client)

var answer = xfa.host.messageBox("Send e-mail?","e-mail",2,1);

if(answer==1){

EmailSubmitButton1.execEvent('click');

}



Hope this helps.

Avatar

Former Community Member
Mr. Roman Boiko,



thanks for your help! i will try it! But now it party time!))



Very christmas and happy new year!