...

View Full Version : Send Form Details to Email But Maintain Format



Icedan
04-20-2005, 12:22 PM
I have a simple form, that you fill out. Typical name, address stuff.

But some of the fields have CSS styles attached to it (one for example is all caps, red font and bold). So when the form is sent to an email address, the format of the text is lost.

How can I fix this?

jbot
04-20-2005, 12:26 PM
some of the fields have CSS styles attached to it (one for example is all caps, red font and bold). So when the form is sent to an email address, the format of the text is lost.

you can't.

Icedan
04-20-2005, 12:29 PM
Ok, but maybe I can write a script that converts the fields into different formats? (so do away with CSS).

Or maybe I can write a script that sends the form details to another HTML page and send that HTML page to an email?


DIDN'T THINK OF THAT DID YOU... noooo... :p

jbot
04-20-2005, 02:19 PM
Or maybe I can write a script that sends the form details to another HTML page and send that HTML page to an email?

DIDN'T THINK OF THAT DID YOU... noooo... :p

NO NEED TO SHOUT .... :p

actually, that's just plain stupid. why would you use JS to send the form to another page and then use JS to send that page to an e-mail. that's just too convoluted, over-the-top and unnecessary. and besides, you can't even do it.

what you can do, however, is POST the form to a serverside application which then sends the email. that's how it's always been done. of course, if you weren't such a stupid noobie troll you'd know that.

Icedan
04-21-2005, 03:05 AM
wow, my first time being called a newbie

For 8 years I have been on the Internet, and NOW someone calls me a newbie? :confused:


anyway, thanks for the tip.

jbot
04-21-2005, 10:44 AM
For 8 years I have been on the Internet, and NOW someone calls me a newbie?

well, in CodingForums you are. and to be fair, that was a noob-level idea you had. :p

Icedan
04-26-2005, 12:30 PM
Jbot,

I'm bringing this subject back up.

I have scoured the Internet for ways to do this; but there are no answers, or the closest I can find is something like: "Process Forms and send to email addresses in text AND HTML!! wow! download me now!!".

After testing all of these thousands of scripts, the text and HTML are exactly the same, whats the point of sending it as HTML aswell then?


I'm going to ask this again, but make myself a little bit clearer; and before I ask this, I just want you to know, that I already know how to send form details to an email address. I have known this for many many years.


Question: Is it possible to send form details to an email address, but making sure the details are positioned inside tables (html tables), that have coloured backgrounds, bold format, etc - all within the email itself.


If this is possible, how does one do it?

_Aerospace_Eng_
04-26-2005, 12:35 PM
It all depends on the server side script you are using, for example, this one (http://forum.weborum.com/index.php?showtopic=353) can be formatted to send html as an email.

glenngv
04-26-2005, 12:42 PM
Have you tried my suggestion in your other thread (http://www.codingforums.com/showthread.php?t=57466#post300413)?

Icedan
04-26-2005, 05:11 PM
Aerospace, if the server had PHP support, I know I would be able to do it. The company doesn't want to support PHP, so I am stuck with ASP. But if you can do it with PHP, then surely you can do it with ASP; just no one has written the code yet.


Glenngv, it does work, but only to a certain extent. CDONTS does not support tables. It only supports very basic HTML (bold, italics, <br>, etc).

glenngv
04-27-2005, 04:02 AM
Glenngv, it does work, but only to a certain extent. CDONTS does not support tables. It only supports very basic HTML (bold, italics, <br>, etc).
Can't you do away with tables? Why not just use CSS to layout the data? As I see it in the other thread, the data is not really tabular. The layout is just in "field name: field value" format.

Icedan
04-27-2005, 05:01 AM
hm well it does support style:colour


I'll give it a try

jbot
04-27-2005, 10:59 AM
Can't you do away with tables? Why not just use CSS to layout the data? As I see it in the other thread, the data is not really tabular. The layout is just in "field name: field value" format.

it is still tabular. in fact, it is still the most semantically correct tag usage possible. yes, you could lay out that sort of information using definition lists, and format it to look like tables using CSS, but that would still be wrong, since the information isn't straight term and definition values.


<table summary="Two column table rendering name-value pair relationships to demonstrate the semantic superiority of tables over DLs">
<caption>Demonstration of semantic data display</caption>
<colgroup>
<col class="fieldname">
<col class="fieldvalue">
</colgroup>

<tbody>
<tr>
<td scope="row">Name</td>
<td>jbot</td>
</tr>

<tr>
<td scope="row">Occupation</td>
<td>Web Developer</td>
</tr>
</tbody>
</table>

perhaps one advantage DLs have is that they'll degrade nicer on non-table-supporting browsers, such as Lynx.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum