Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 13 of 13
  1. #1
    New Coder
    Join Date
    Apr 2005
    Posts
    45
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Send Form Details to Email But Maintain Format

    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?
    Last edited by Icedan; 04-20-2005 at 11:25 AM.

  • #2
    Senior Coder
    Join Date
    Feb 2004
    Location
    Edinburgh
    Posts
    1,352
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Icedan
    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.
    *keep it simple (TM)

  • #3
    New Coder
    Join Date
    Apr 2005
    Posts
    45
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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...

  • #4
    Senior Coder
    Join Date
    Feb 2004
    Location
    Edinburgh
    Posts
    1,352
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Icedan
    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...
    NO NEED TO SHOUT ....

    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.
    *keep it simple (TM)

  • #5
    New Coder
    Join Date
    Apr 2005
    Posts
    45
    Thanks
    0
    Thanked 0 Times in 0 Posts
    wow, my first time being called a newbie

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


    anyway, thanks for the tip.

  • #6
    Senior Coder
    Join Date
    Feb 2004
    Location
    Edinburgh
    Posts
    1,352
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Icedan
    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.
    *keep it simple (TM)

  • #7
    New Coder
    Join Date
    Apr 2005
    Posts
    45
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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?

  • #8
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    It all depends on the server side script you are using, for example, this one can be formatted to send html as an email.

  • #9
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    11,037
    Thanks
    0
    Thanked 250 Times in 246 Posts
    Have you tried my suggestion in your other thread?

  • #10
    New Coder
    Join Date
    Apr 2005
    Posts
    45
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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).

  • #11
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    11,037
    Thanks
    0
    Thanked 250 Times in 246 Posts
    Quote Originally Posted by Icedan
    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.

  • #12
    New Coder
    Join Date
    Apr 2005
    Posts
    45
    Thanks
    0
    Thanked 0 Times in 0 Posts
    hm well it does support style:colour


    I'll give it a try

  • #13
    Senior Coder
    Join Date
    Feb 2004
    Location
    Edinburgh
    Posts
    1,352
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by glenngv
    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.

    Code:
    <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.
    *keep it simple (TM)


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •