用户
 找回密码
 入住 CI 中国社区
搜索
查看: 2335|回复: 0
收起左侧

[HELP] 2个关于表单校验失败后 通过set_*绑定表单值的问题

[复制链接]
发表于 2010-4-27 15:05:17 | 显示全部楼层 |阅读模式
各位,
小弟
1.在VIEW中通过 <?php echo form_checkbox('checkbox'); ?> 实现的checkbox 当表单校验失败后 如何通过 set_checkbox 绑定表单里checkbox的值啊?

2.在Controller中
$sec_array = array(
        ''        =>        '- Select a Question -',
        'What is the first name of your favorite uncle?'        =>        'What is the first name of your favorite uncle?',
        'Where did you meet your spouse?'        =>        'Where did you meet your spouse?',
        'What is your oldest cousin&#39;s name?'        =>        'What is your oldest cousin&#39;s name?',
);
$vars['sec'] = form_dropdown('sec', $sec_array, '0', 'id="sec");
在VIEW中通过 <?php echo $sec; ?> 实现的下拉选框 当表单校验失败后 如何通过 set_select 绑定表单里sec的值呢?

谢谢

本版积分规则