我尝试将单选按钮值保存到Perfex CRM中的数据库,并且使用下面的代码成功地保存了选择下拉列表的值。
$accessability = [
0 => ["id" => "Yes", "name" => _l("Yes")],
1 => ["id" => "No", "name" => _l("No")],
2 => ["id" => "Not Applicable", "name" => _l("Not Applicable")]
];
$value = isset($accessability)
? $disscussion->accessability
: "";
echo render_select(
"accessability",
$accessability,
["id", "name"],
"ACCESSABILITY TO PROPERTY WAS CLEAR",
$value
);
?>
在这里,我尝试将单选按钮值存储到数据库。
<div class="col-md-12">
<div class="mtop10">
<span>ACCESSABILITY TO PROPERTY WAS CLEAR</span>
<div class="radio radio-primary radio-inline">
<input type="radio" value="1" id="1" name="Yes" data-text="Yes" <?php if(isset($accessability) ? $disscussion->accessability : ""; ?>>
<label for="1">Yes</label>
</div>
<div class="radio radio-primary radio-inline">
<input type="radio" value="1" id="2" name="No" data-text="Yes" <?php if(isset($accessability) ? $disscussion->accessability : ""; ?>>
<label for="2">No</label>
</div>
</div>
</div>
我是新的Codeignitor请帮助
1条答案
按热度按时间egmofgnx1#