Expand my Community achievements bar.

Submit Button Script to Create Acknowledgment or Close Window

Avatar

Former Community Member
I'm hyperlinking a form on our Intranet and everything works great. I receive the submitted forms and data by email. However, I would like to create a message telling the user it's ok to close the form or script it to do so automatically after the email is sent.



Design is great, but I'm not JAVA savvy (though I have been able to add useful syntax from various forums).



Suggestions?
6 Replies

Avatar

Former Community Member
When you submit by email we merely call the mail client and hand the message off to them. We cannot guarantee delivery of the mail message (that is up to the mail client and the mail system). So you could generate a message when that happens but all it means is that the mail client received it. How are you initiating the email submit.....are you using an Email Submit Button or have you programmed a regular execute button to do the submit for you?

Avatar

Former Community Member
Yes, I'm using the Email Submit Button, and a message at time of handoff would suffice.

Avatar

Former Community Member
Ok so set your email submit button as invisible and put another button on the form (this will be the one you click). On its click event execute this code:



emailsubmitbuttonname.execEvent("click");

app.alert("Your email has been submitted to the server");



The 1st line of code will do the submission for you and the second line will put out the message.



Hope that helps

Avatar

Former Community Member
Thanks Paul. This works. However, the message occurs before the required field validation. Can I run the validation first?

Avatar

Former Community Member
You would need a post Submit event .... I do not believe that there is one exposed in your release. It is slated for the next release of the product to expose it to you.