表格填写在网页上,需要通过电子邮件发送 [英] Form filled on web page, needs to be emailed

查看:190
本文介绍了表格填写在网页上,需要通过电子邮件发送的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在处理的联系我们"网页上有一个简单的表格,它询问姓名,电话号码,联系方式,您要问我们的内容以及您的电子邮件地址.

联系人类型"还会选择要发送电子邮件的电子邮件地址.

但是,一旦按下发送"按钮,它将打开电子邮件客户端并显示正确的收件人地址,但表格中没有其他详细信息.


这是到目前为止的代码...

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>

推荐答案

首先,我想这有点像将相同的问题发布到不同的论坛.您还放宽了其他响应可能提供的上下文.

您是否尝试过使用 multipart/form-data 而不是 text/plain ?

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">


这篇关于表格填写在网页上,需要通过电子邮件发送的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆