Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: HTML Web-Development
The 'Contact Us' web page I am working on has a simple form, it askes for name, phone number, type of contact, what you want to ask us, and your email addy.
 
The 'Type of contact' also selects the email addy to send the email to.
 
However, once the 'Send' button is hit, it opens the email client and shows the correct TO address, but does not have the other details in the form.
 

Here is the code so far...
<form action="../" enctype="text/plain" method="post">
                <p style="MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px">
                    <input name="Customer Name :" size="60"
                        style="background-color: #FFFFCC; text-align: left;" type="text" value="Name" />
                    <input name="Telephone Number :" size="60"
                        style="background-color: #FFFFCC; text-align: left; width: 202px; margin-left: 42px;"
                        type="text" value="Tel No." />
                </p>
                <p style="MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; height: 12px; width: 655px;">&nbsp;</p>
                <p style="MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px">Please use our contact form to make any enquiries.</p>
                <p style="MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px">&nbsp;</p>
                <p style="MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px">Type of enquiry?</p>
                <p style="MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px">
                    <select id="SelectContactType" name="sendEmailTo" onchange="setAction">
                        <option value="mailto:sales@fosbern.co.uk">Sales</option>
                        <option value="mailto:colin@fosbern.co.uk">Contractor</option>
                        <option value="mailto:pat@fosbern.co.uk">Technical</option>
                        <option value="mailto:enquiries@fosbern.co.uk">Other</option>
                    </select>
                </p>
                <p style="MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px">&nbsp;</p>
                <p style="MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px">Your Question...</p>
                <p style="MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; height: 62px;">
                    <textarea rows="3" cols="2" id="TextArea1" name="Question :"></textarea>
                </p>
                <p style="MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; height: 9px;">&nbsp;</p>
                <p style="MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; height: 9px;">&nbsp;</p>
                <p style="MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; height: 9px;">&nbsp;</p>
                <p style="MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px">Finally, Your Email Address...</p>
                <p style="MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px">
                    <input name="Customer Email Address :" size="60"
                        style="background-color: #FFFFCC" type="text" />&nbsp;&nbsp;&nbsp;&nbsp;
                    <input
                        id="Button1"
                        type="button"
                        value="Send"
                        onclick="location.href=this.form.sendEmailTo.options[sendEmailTo.selectedIndex].value"/>
                </p>
                <p align="center" style="width: 367px">
                    Press the Submit Button and we will contact you shortly with details, prices
                    etc
                .</p>
                </form>
 
Posted 8-Apr-10 12:00pm
Dalek Dave432.9K

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

First, I would say this is a bit like posting the same question to different forums. You also loose the context that may be provided from other responses.
 
Have you tried using multipart/form-data rather than text/plain?
 
<removed action="email addres" enctype="multipart/form-data" method="POST">
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 7,903
1 Sergey Alexandrovich Kryukov 7,142
2 DamithSL 5,604
3 Manas Bhardwaj 4,986
4 Maciej Los 4,820


Advertise | Privacy | Mobile
Web01 | 2.8.1411023.1 | Last Updated 8 Apr 2010
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100