[英]Radio button data not being submitted
I'm using Bootstrap in addition to this, I simply want to know if ductless_no or ductless_yes is selected, why is this value not showing up in my POST data? 除此以外,我还在使用Bootstrap,我只是想知道是否选择了pipeless_no或pipeless_yes,为什么该值未显示在我的POST数据中?
<div id="ductless">
<div class="input-group" style="margin-bottom:5px;">
<span class="input-group-addon">Ductless Minisplit<span style="color:#F00;">*</span></span>
<div style="margin-left:20px;" name="reset12" class="btn-group" data-toggle="buttons">
<label class="btn btn-primary" onclick="$('#pu').collapse('show');$('#no_drop').collapse('show');" >
<input type="radio" name="ductless_no" value="1" > No
</label>
<label class="btn btn-primary" onclick="$('#pu').collapse('hide');$('#no_drop').collapse('hide');" >
<input type="radio" name="ductless_yes" value="1" > Yes
</label>
</div>
</div>
</div>
Neither ductless_no or ductless_yes are being set 既未设置pipeless_no也未设置pipeless_yes
Just to elaborate further...this is one part in a huge form, the form is being sent however when doing a var_dump on the $_POST data neither ductless_no or ductless_yes are showing as selected when I select them. 只是为了进一步阐述...这是一个很大的形式,正在发送该形式,但是当在$ _POST数据上执行var_dump时,当我选择它们时,pipeless_no或pipeless_yes都不会显示为选中状态。
Thanks for the downvotes that helps 感谢您的帮助
Similar question: Twitter Bootstrap HTML form radio button not working with PHP POST 相似的问题: Twitter Bootstrap HTML表单单选按钮不适用于PHP POST
There can only be one option selected. 只能选择一个选项。 Give each radio button the same name of "ductlessYesNo" and a different value... I have given 1 for no and 2 for yes.
为每个单选按钮指定相同的名称“ ductlessYesNo”,并使用不同的值...我给了1表示否,给2表示是。
<label class="btn btn-primary" onclick="$('#pu').collapse('show');$('#no_drop').collapse('show');" >
<input type="radio" name="ductlessYesNo" value="1" > No
</label>
<label class="btn btn-primary" onclick="$('#pu').collapse('hide');$('#no_drop').collapse('hide');" >
<input type="radio" name="ductlessYesNo" value="2" > Yes
</label>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.