views:

721

answers:

6

I've had several clients ask this, and I've never been able to get or give a satisfactory answer. Can you (practically) put a working form into an HTML email?

My understanding is that you can, but that there's no guarantee of email clients properly handling it, so that method would only be practical with individual recipients that you'd had a chance to test with, rather than with huge mailing lists of people using diverse email clients. But my understanding comes from a lot of developer friends shrugging at the question and no authority that I've found giving a clear answer either way.

What does Stack Overflow think? What's the best answer when you're asked to do this by a client who, for instance, wants a few hundred people to fill out a survey?

(Don't bother just answering "provide a link to a form on a website". That's the obvious answer. I want to know specifically if there's a consensus about forms in email.)

+2  A: 

You're correct - it's very unlikely that any significant portion of email clients will handle this well. It's hard enough getting plain HTML to work consistently in email clients, let alone "advanced" functionality like forms. I promise you that if you send it out to an audience with a heterogeneous mix of email clients, at least 80% of them will say "your form doesn't work".

If you're not sure, sign up for half a dozen free email accounts, plus one you can access via imap. Send the email with a simple form to all the account, plus view the imap one through 3 different clients (say, Thunderbird, Outlook, and Eudora). See if it works, and let us know.

Ian Varley
Good suggestion, though I hoped it wouldn't come to that. I wish I could be satisfied with the "don't rely on it" answer, but clients hate hearing "the thing you want is possible, but we're still not going to do it for you for reasons you won't understand". It seems to come down to that, though.
Phantom Watson
+2  A: 

Yes, I've seen this done (emails from LiveJournal do this, as an example). As you mention it's not something you should rely upon working, though. Just putting an HTML form with action set to the full URL to post to should work wherever it's supported, however.

It's worked in most web-based email systems I've used but I don't know how many standalone clients would deal with it.

Calum
+1  A: 

If there's no guarantee of clients properly handling it, I would say its' impractical. Do you really want to be sending mails out where the recipient will perform some action, and then it may or may not have actually been accomplished?

I also would find this most annoying.

AlexCuse
+1  A: 

I would just provide a link to the survey/form capture site.

The problem you have is -

a. Not everyone accepts HTML email

b. How are you going to handle validation? Even if the form did submit from within the mail client to the destination server, you'd need to handle validation on the server. That's got potential to confuse the hell out of folk in a 'I started the form here, now I'm here...what gives?' kind of way.

HTH
Kev

Kev
Why the vote down?
Kev
Nothing personal. From the question: "Don't answer 'provide a link to a form on a website'. That's obvious." First line of your answer: "I would just provide a link to the survey/form capture site."
Phantom Watson
However the rest of the answer (if you read further) did expand on the (valid) reasons why, rather than just saying put a link.I think I added valid commentary to the overall consensus....which was effectively use a link to a web form.
Kev
Yep. That's why it rightfully earned an upvote, too, and may accumulate more still.
Phantom Watson
+12  A: 

1. HTML in email is perceived by some to be a blight

It just hardly ever works, and when it does work, it doesn't work properly.

I recently experienced a case where a rather lengthy html email, although well composed and worked rather well, was cut in half and prematurely trimmed by GMail ( due to length ) which mangled the design a bit.

I've also had cases where the HTML was so malformed the email turned up in my inbox as if it were really a blank email.

2. I don't trust forms in my email

For security reasons mostly, some clients may intercept the form action, and the post action won't go anywhere ( Especially in cases where they have a physical email client, Open Web browser and posting data via it, thats rather complicated ).

You are simply better off having a form on a website that you can control, and people don't have any nasty surpises about ( Especially if you need javascript to execute the form, many email clients won't put up with that )

Maybe, you can put a form in, but for the sake of sanity, be as backwards compatible as possible, so that somebody with a text based browser like Pine or Mutt can still read it, and be given a link to a working form that doens't require client magic.

Kent Fredric
+4  A: 

Simple answer is no, you can't. Try telling your client something like this:

Hardly any email clients will allow HTML forms in email, and some spam systems specifically block and delete emails that contain forms. This is due to security. There's a good chance that not even a fifth of the emails that are send with forms in them will even reach the recipients in-box.

Ty
I appreciate the advice. Really, a third of the problem is the technical feasibility, the other third is the overall practicality, and the last third is "How the fuck do I explain this to my neo-Luddite customers?".
Phantom Watson
I completely understand. I've had to explain this to a few clients before as well. I actually had one say they wanted to go through with it anyways. It was interesting to see how specific email clients handled forms. Thunderbird for example changes all of the input boxes to "[...]" or something.
Ty
Hm. It just occurred to me that my bosses (I work for a research center) might let me use my time on the clock to actually do a full study into this (with surely predictable results). If I end up doing it, I'll let the Stack Overflow crowd know the results.
Phantom Watson
if you think you can publish a paper telling people to stop using html for email, I say 'go for it'
Kent Fredric