【发布时间】:2020-07-28 13:35:39
【问题描述】:
如何确保设置了 if (checkbox),然后通过 sport_id 字段启用过滤器,并且仅在 sport_id 字段中有“1”的位置显示那些行。甲骨文数据库
<form action=" " method="post">
<input type="checkbox" name="sport_id" value="1">
</form>
<div class="col-xs-6 col-md-3">
<p></p>
<div class="checkbox">
<label>
<?php echo form_checkbox('sport_id', sport::checkboxValid(),
($this->input->get('sport_id') > 0) ? 'checked="checked"' : '')?>
</label>
</div>
</div>
【问题讨论】:
-
要么我从你的问题中遗漏了一些东西,要么你需要:1. 使用
<input ...中的 PHP 部分或 2. 使用 JavaScript 更新一些更改。 -
你能提供更多细节吗?我只是第一次尝试这样做
-
<div class="checkbox"> <label> <input type="radio" value="contact" name="type" {{ old('type', $menu->type) === 'contact' ? 'checked' : '' }}> Contact </label> </div> </div>签入与您类似的框架:laracasts.com/discuss/channels/general-discussion/…
标签: php html database checkbox filter