我有一个大表格.. 有这么多的选择选项。及其从邮件功能。下面是我的代码
<label>Type of Event? </label>
<select id="eventtype" title="" name="eventtype" class="required select">
<option value="">Select Your Event Type</option>
<option value="WEDDINGS">WEDDINGS</option>
<option value="CORPORATE">CORPORATE EVENT</option>
<option value="SPECIAL">SPECIAL EVENT</option>
<option value="OTHER">OTHER SINGLE SERVICES</option>
</select>
<div class="cls"></div>
<div class="container">
<div class="WEDDINGS">
<label>Package</label>
<select name="Package" id="Package">
<option value="Day Of Coordination">Day Of Coordination</option>
<option value="Week of Coordination">Week of Coordination</option>
<option value="Month of Coordination">Month of Coordination</option>
</select>
</div>
<div class="CORPORATE">
<label>Package</label>
<select name="Package" id="Package">
<option value="Meetings">Meetings</option>
<option value="Client Appreciation">Client Appreciation</option>
<option value="Conference & Conventions">Conference & Conventions</option>
<option value="Corporate Shows">Corporate Shows</option>
<option value="Employee Appreciation">Employee Appreciation</option>
</select>
</div>
<div class="SPECIAL">
<label>Package</label>
<select name="Package" id="Package">
<option value="Engagements">Engagements</option>
<option value="Bar Mitzvah">Bar Mitzvah</option>
<option value="Quincearas">Quincearas</option>
<option value="Birthdays">Birthdays</option>
<option value="Fashion Shows">Fashion Shows</option>
<option value="Showers">Showers</option>
</select>
</div>
<div class="OTHER">
<label>Package</label>
<select name="Package" id="Package">
<option value="Wedding Consultation and Guidance Only">Wedding Consultation and Guidance Only</option>
<option value="Venue Search Only">Venue Search Only</option>
<option value="Coordination of Engagement Party Only">Coordination of Engagement Party Only</option>
<option value="Providing Qualified and Screened Vendors Only">Providing Qualified and Screened Vendors Only</option>
</select>
带有下拉菜单的 js 代码
<script>
$(document).ready(function() {
$('#eventtype').bind('change', function() {
var elements = $('div.container').children().hide();
var value = $(this).val();
if (value.length) {
elements.filter('.' + value).show();
}
}).trigger('change');
});
</script>
我的 from 就像如果选择 WEDDING 然后显示婚礼 div 所以在那里显示另一个下拉列表.. 如果选择 CORPORATE EVENT 然后显示 CORPORATE EVENT div ...但无论是什么下拉列表,当邮件正确数据未通过时,我都会选择。它总是 OTHER div 1st select value 的意思是“仅限婚礼咨询和指导”......我不知道为什么......可能是我弄错了什么......下面是 php 邮件代码的一部分
if($violation)
{
$eventtype = $_POST['eventtype'];
$firstname = $_POST['firstname'];
$lastname = $_POST['lastname'];
$datepicker = $_POST['datepicker'];
$datepicker2 = $_POST['datepicker2'];
$time = $_POST['time'];
$EMAIL = $_POST['EMAIL'];
$phone = $_POST['phone'];
$Package = $_POST['Package'];
$otherfound = $_POST['otherfound'];
if (isset($_POST['found_group'])) {
$found = $_POST['found_group'];
for ($i=0; $i<count($found); $i++) {
//echo $found[$i]."<br />";
$found=implode("<br />",$found);
}
}
我想纠正的所有数据都会去..你能告诉我我在哪里弄错了......谢谢