send email selecting checkbox html

1033 views php
1

I trying my cients select what services they want on email. I recevied the email but services are empty, mybe my php file is wrong. Thank you in advance

<h3>Tell us your inquiries</h3>

<hr>
<form id="contact-form" action="mailto:info@dosaladesign.com" method="post" onsubmit="return checkform(this);">
<div class="form-group">
<label for="firstname">First Name <span class="form-required" title="This field is required.">*</span></label>
<input type="text" name="firstname" class="form-control half" id="firstname" required>
                                            </div>
                                            <div class="form-group">
                                                <label for="lastname">Last Name <span class="form-required" title="This field is required.">*</span></label>
                                                <input type="text" name="lastname" class="form-control half" id="lastname" required>
                                            </div>
                                            <div class="form-group">
                                                <label for="email">E-mail <span class="form-required" title="This field is required.">*</span></label>
                                                <input type="email" name="email" class="form-control half" id="email" required>
                                            </div>
                                            <div class="form-group">
                                                <label for="subject">Zip Code <span class="form-required" title="This field is required.">*</span></label>
                                                <input type="text" name="zipcode" class="form-control half" id="zipcode" required>
                                            </div>
                                            <div class="form-group" >
                                                <label for="email">Select Services</label>
                                            <div class="row1">
                                                    <div class="col1"><input id="chk1" type="checkbox"><label>As-Built</label></div>
                                                <div class="col1"><input id="chk2" type="checkbox" onclick="myFunction('New Construction Design','chk2')"/><label>New Construction Design</label></div>
                                                <div class="col1"><input id="chk3" type="checkbox" onclick="myFunction('Residential Remodels','chk3')"/><label>Residential Remodels</label></div>
                                                <div class="col1"><input id="chk4" type="checkbox" onclick="myFunction('Residential Additions','chk4')"/><label>Residential Additions</label></div>
                                                <div class="col1"><input id="chk5" type="checkbox" onclick="myFunction('3D Modeling and Renderings','chk5')"/><label>3D Modeling and Renderings</label></div>
                                                <div class="col1"><input id="chk6" type="checkbox" onclick="myFunction('Interior Design','chk6')"/><label>Interior Design</label></div>
                                                <div class="col1"><input id="chk7" type="checkbox" onclick="myFunction('Space Planning and Furniture Layouts','chk7')"/><label>Space Planning and Furniture Layouts</label></div>
                                                <div class="col1"><input id="chk8" type="checkbox" onclick="myFunction('Custom Furniture Design','chk8')"/><label>Custom Furniture Design</label></div>
                                                <div class="col1"><input id="chk9" type="checkbox" onclick="myFunction('Landscape Design','chk9')"/><label>Landscape Design</label></div>

                                            </div>
                                            </div>
                                                                                <div class="form-group">
                                                <label for="message">Message <span class="form-required" title="This field is required.">*</span></label>
                                                <textarea  name="message" class="form-control" rows="4" id="message" required></textarea>

answered question

1 Answer

11

Ensure that your input elements contain a name attribute and value. According to the specs: If no name is specified, or name is empty, the input's value is not submitted with the form.

https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#name

posted this

Have an answer?

JD

Please login first before posting an answer.