简体   繁体   中英

Include select option in mailto form

I am building an html mailto form that transfers contents of my form into an email body. I was able to get values from the input boxes into the email body. However, the value of my select option does not show up in my email body. Here's my form:

<form class="form" id="car_request_form" role="form" action="MAILTO:some@email.org?subject=Request project" method="post" enctype="text/plain">
    <div class="form-group">
        <label for="">Your Name*</label>
        <input id="your_name" class="form-control" type="text" name="name" value=""><br>
        <label for="">E-Mail*</label>
        <input id="email" class="form-control" type="text" name="mail" value=""><br>
        <label for="">Comments</label>
        <input class="form-control"  type="text" name="comment" value="" size="50"><br>
    </div>
    <div class="form-group">
        <label for="">Car model</label>
        <select class="form-control" id="car_model">
            <option selected="" disabled="">Select</option>
            <option value="audi">Audi</option>
            <option value="bmw">BMW</option>
        </select>
    </div>
    <div class="form-group">
        <input type="submit" value="Send" button class="blueModalButton">
        <input type="reset" value="Reset" button class="blueModalButton">
        <br>
    </div>
</form>

And here is the email body:

name=asdf

mail=gsdfgdfg

comment=asdf

As you can see, the car model select option does not pop up in the email body.

Can someone help?

Thanks in advance!

            <select name="car_model">
            <option disabled selected>Select a car model</option>
            <option>audi</option>
            <option>BMW</option>
            </select>

Try this, it works for me.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM