Click here to Skip to main content
16,019,106 members
Please Sign up or sign in to vote.
5.00/5 (2 votes)
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...
XML
<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

1 solution

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">
 
Share this answer
 

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900