表單包含radio:
<td class="formLabel" style="text-align: right;"><label>狀態:</label></td>
<td class="formValue"><label style="margin-right: 10px;"><input name="_state" type="radio" value="0" checked="checked"/>上架</label><label><input name="_state" type="radio" value="1"/>下架</label></td>
open edit dialog,並加載數據
//修改Theme
function edit(row) {
row = decodeURI(row);
row = JSON.parse(row)
console.log(row)
$('#theme_dlg').dialog('open').dialog('setTitle', '修改<?=THEME_TITLE?>');
$('#theme_fm').form('load', row);
url = '<?= get_rest_url() . FT_NAMESPACE ?>/theme/'+row.id;
}
調用edit()方法彈出表單面板的時候,使用了$(‘#theme_fm’).form(‘load’, row);加載數據
奇怪的事發生了
console.log(row)
state被easyui刷了
這纔想起來我表格是用的easyui-treegrid
state被easyui-treegrid使用了
那隻好改state字段別名了,改成_state
是不是可以了