我有在线预约表格的多项选择选项值。我的项目就像这个项目 (显示基于先前下拉选择的第二个下拉列表)
当用户选择其他选项时,我有一些 jquery 代码来清除选项,事情是我将如何验证表单,我的意思是在二级选择选项值处选择了至少一个选择选项。
我尝试在验证 php 页面上使用此代码
else if ($appointment_gc == " "
|| $appointment_fu == " "
|| $appointment_gas == " "
|| $appointment_col == " "
|| $appointment_ent == " "
|| $appointment_ort == " "
|| $appointment_ps == " "
|| $appointment_package == " " ) {
echo "Submission fails. You have not choose any package.
Please go back and try again.
<input style=\"padding:10px 20px;margin-top:20px;\"
type=button value=\"Back\" onClick=\"history.go(-1)\">";
exit();
}
每个$appointment_...
都是选择选项。我只想选择至少一个选择选项,但似乎无论如何都无法提交。