Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Formatting e-mail once submit clicked in form?

Status
Not open for further replies.

Honyo

IS-IT--Management
Dec 26, 2002
19
0
0
CA
I need to have an e-mail sent in a specific format once a form has been completed and the submit button clicked. I have used the Front Page 2002 "form" and it generates the e-mail. The formatting is terrible. How do I change the e-mail format or even the output result once the submit button is clicked?

Any help would be gretaly appreciated.

Honyo
 
If you want to stick with javascript and posting the form to an e-mail address, your options are limited.

Here's a trick. Make two forms on your page - one with all of the fields, and a second with one hidden text field and a submit button. When you submit the second form, send it to a javascript function for "validation". In the validation function, set the value of the one hidden string field in the second form to include all of the values from the first form, formatted however you like. (Start it off with a "\n", or newline character for best results.) Then let this second form submit through to the e-mail posting.

Your e-mail message will contain one field value, the value of the hidden text field in the second form. Since you formatted the text in this field yourself, you can make it look pretty much however you like.

You do still get the "fieldname=" on the first line of the e-mail message, but the rest of the message is completely in your control.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top