Using forms in HTML emails
Posted by David Greiner on April 26, 2005
Sometimes it can be very handy to include a HTML form in an email campaign. Whether it's a quick customer survey or a subscribe form for another list, they can be a good way to interact with a recipient right there in their email client. We even use them occasionally to get feedback off you guys.
While they can be useful, there are a number of precautions you need to consider before using them.
Hotmail is a no go
Right off the bat, Hotmail will not allow you to include working forms in an email. Worse still, they actually display the form, but remove bits of code required to make it work. By stripping all values from your <form> tag and removing the name values of all form elements, they render your form useless. Your Hotmail recipients can still complete the form, but when they hit the submit button, nothing happens. This is probably worse than the form not displaying in the first place.
Use GET and not POST
Some email clients, most notably Mac Mail do not support forms that use <form method="post" action="http://.... Because of this, you'll need to use the <form method="get" action="http://... approach, which will write all form contents to the query string of the page they are posted to.
Tabbing won't work
Almost all email clients that provide a preview pane, especially popular email clients like Outlook and Outlook Express don't allow you to tab between form elements. This means that the moment a recipient completes the first field in your form and clicks the TAB key, the focus is automatically switched to another part of the software. This has the potential to confuse a lot of recipients and is something to be wary of.
Recommended Approach
Before deciding whether or not to include a form in your next email campaign, take a close look at your subscriber list. If you notice many Hotmail addresses, make the form available on the web and include a link to the form in your email. If that's not enough to stop you, then considering splitting your subscribers into Hotmail and non-Hotmail and then send a different version to each list. And remember, use GET instead of POST.
8 comments so far
Stay in the loop
Prefer updates via email? Sign up below and we'll send you all the good bits each month.
Dig into a category
- Articles/Tips
- Designer Interviews
- Email Newsletter Design
- Happy Customers/Press
- New Features & Updates
- Observations & Answers
Vijay
wrote on November 24, 2005 03:16 AM
Is it posible to use next generation web forms XForms in emails? As of now the browsers are didn't support the XForms.
Is there any other way to achive the survey form in emails?
Thanks in advance.
Richard
wrote on January 19, 2006 03:59 AM
David,
Thanks again for providing an elegant simple solution to help my team and I serve our growing customer base.
Have you folks given any thought into crafting a Survey module or Survey Product which produces similar simple clean reporting, and if not is there a product that you could recommend?
Dave Greiner
wrote on February 23, 2006 08:27 AM
Hey Richard,
Sorry for the delay in my response, your comment slipped under the radar ;) The best survey tool I've ever used is definitely Survey Monkey.
sunil ahuja
wrote on May 31, 2006 10:31 PM
I need to send a HTML form and i am using php mail function for that.
On HTML page its working fine but when the same page embeded in the outlook mail.
javascript validation and post method on form submission is not working.
any help or suggestion is highly appreciable.
David Yussen
wrote on June 9, 2006 02:01 AM
Sunil - Try enabling the internet zone. (View -> View in Internet Zone). I had this problem when testing a multipart email sent to myself. The default settings in Options may also be an issue - check "Change Automatic Download Settings." Post should work OK; it's my understanding that javascript won't work. You'll need to use server-side validation where submitting launches a browser with a page describing the error.
xcbgcb
wrote on August 9, 2006 09:10 AM
bxcbx
liviu mocanu
wrote on September 1, 2006 01:34 AM
Hi, I'm having a similar problem...I cannot submit form data via POST method from within an email client (outlook express/mozilla tb). However I have notice that on some computers this is working!!!
Any ideas if some security measures need to be adjusted before attempting form submission from email client?
botong
wrote on September 2, 2006 04:54 AM
Hi, I've been looking everywhere for some resources, scripts, forums, etc. to help me out. I am an amateur web designer and I've been having alot of trouble making a comments layout exactly like this. This format is pretty much what I need for a site I am currently revamping. I have my form set up in how I want it to look, but I don't know how to finish executing it.
I pretty much want the user to fill out the form and just hit the post button. Then the page will reload again with the most recent entries descending. I read too many scripts and on-line guides, all I found confusing.
Any clear and concise tips would totally help me out and get me out of this slump.
Got anything to add?