// css控件样式
.layui-form .layui-form-checkbox {
height: 38px;
line-height: 38px;
}
.layui-form .layui-form-checkbox i {
height: 36px;
}
提交表单时必须显式设置checkbox的值,否则会滞留checkbox选中状态。
// 表单提交
form.on("submit(*)", function (e) {
var data = e.field
data.failsend = data.failsend ? 'on' : ''
data.failsave = data.failsave ? 'on' : ''
console.log(data)
table.reload("tb", {
where: data
, page: {
curr: 1
}
})
return false
})
// php接收
if(I('failsend')=='on')$where.="
and sms_code<>'OK'
";
if(I('failsave')=='on')$where.="
and smsre_success=0
";