Hi all,
I wonder if anyone has had / solved this situation:
I have a stateless form I'm using to show an email (from a selectable template). The user is presented with the form (with various fields filled in depending on context), then can edit the body text, and send.
Ideally, I'd have it fire the script, then simultaneously close the form and report a success message (preferably one I specify) like a normal form.
Working out the type of button to use / which to use to fire the sendmail script is a bit of a tricky one:
- If I use the 'submit' type button, it fires the script and closes the form (but gives no success message);
- If I use the 'submit' type button but also have an alert to show success to the user, it shows the alert but then doesn't close the form (so it sits there with the data still in it);
- If I use the 'button' type button, it fires the script (and I can show an alert) but it doesn't close the form;
- If I try to user a 'success message' in the script, it tells me this is only possible during 'on success' script trigger - which is not available for stateless forms.
Any ideas gratefully received!
James
P.S. Apologies if I take a few days to reply - I'm about to travel.