Is it impractical to put an HTML form into an email? [closed]
Asked Answered
C

6

10

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.)

Cubism answered 9/1, 2009 at 15:41 Comment(0)
M
20

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.

Malayan answered 9/1, 2009 at 15:50 Comment(0)
A
6

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.

Anaerobic answered 9/1, 2009 at 15:58 Comment(4)
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.Anaerobic
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.Cubism
if you think you can publish a paper telling people to stop using html for email, I say 'go for it'Malayan
Adding a little more hard evidence to this post, Flitehaus performed a check in 2011 with their own site and Gmail's. Surprisingly, even in Gmail, IE and Firefox didn't allow forms while Chrome and Safari did.Matthaeus
K
3

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.

Khorma answered 9/1, 2009 at 15:46 Comment(0)
I
2

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.

Interception answered 9/1, 2009 at 15:46 Comment(1)
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.Cubism
C
2

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.

Cioffi answered 9/1, 2009 at 15:48 Comment(3)
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."Cubism
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.Cioffi
Yep. That's why it rightfully earned an upvote, too, and may accumulate more still.Cubism
Y
1

If there's no guarantee of clients properly handling it, I would say it's 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.

Yogi answered 9/1, 2009 at 15:47 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.