Hi,
Being new to HS, I am really liking the embedded form feature and what you can do with it (see previous thread, for instance).
One thing I would like to do after the submit button is clicked and the data is validated is have the validated form field data sent to two additional locations using onFormSubmit. I would like to send it in an email somewhere, and also have it added to a MySQL db on the server hosting the page on which the embedded form appears. Or if the latter is not possible then at least have it appended to any other data already in a text file on the web server in a format that can easily be imported into a database or spreadsheet. What is the script or code to do that? I’ve been searching online, including other threads related to onFormSubmit, and have not found that. The field names and IDs I do have, however. I’m not sure if both are needed or only one:
Names:
firstname, lastname, email, phone
ID’s:
firstname-nnnnnnnnnnnn-nnnn-nnnn-nnnn-nnnnnnnnnnnnn
lastname-nnnnnnnnnnnn-nnnn-nnnn-nnnn-nnnnnnnnnnnnn
email-nnnnnnnnnnnn-nnnn-nnnn-nnnn-nnnnnnnnnnnnn
phone-nnnnnnnnnnnn-nnnn-nnnn-nnnn-nnnnnnnnnnnnn
And if anyone knows only part of the answer since there is more than one goal here, I would much appreciate and be happy to receive whatever part you know. If it means having to call a server-side script on the web server, that’s fine too.
Thanks.
onFormSubmit: function($form) {
// Stuff do do before form is submitted
}