Expand my Community achievements bar.

How to add an Alert Message

Avatar

Level 2
Hi, what steps must I take to add an alert message that reminds the Adobe Reader end user to Print their form if they wish to keep a record of their form data.



Also, where should such an alert appear, when and upon which event type?



Harry
4 Replies

Avatar

Former Community Member
I assume your form will have some type of buttons (email button, print button, submit button, export button...) which will allow user to decide what to do after he/she completes the form. The best place is to put the alert on the click event of this button to remind your user to print out a copy of the form.

Avatar

Level 2
Thanks Jimmy, unfortunately it doesn't work on my Submit button (which is where I do want it).. Here's what I have on the standard Submit button.



----- form1.SF_P8.SF_print-submit.EmailSubmitButton::click - (JavaScript, client) ------------------



xfa.messageBox("Please ensure you also print a copy for your records", Warning, 1, 1);



--

this makes my button do nothing at all, not even submit. I think it's because there are 2 events associated with it, the invisible "submit" and the new warning. Any suggestions?



Harry

Avatar

Level 2
sorry I meant to say:



xfa.host.messageBox("Please print a copy for your records.", "Warning", 1, 1);



this works, but disables the subsequent standard Email Submit message.



Harry

Avatar

Former Community Member
Try using the preSubmit event instead of the click event. By putting code into the click event, you are overriding the form submission.