set_select()帮助函数不工作 [英] set_select() helper function is not working
本文介绍了set_select()帮助函数不工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我使用了下面的一些代码,
I have used some codes as below,
<select class="form-control selection" name="currency">
<option value="">select currency</option>
<option value="AED"<?php echo set_select('currency', 'AED'); ?> >AED</option>
<option value="SAR"<?php echo set_select('currency', 'SAR'); ?> >SAR</option>
<option value="MAD"<?php echo set_select('currency', 'MAD'); ?> >MAD</option>
<option value="TRY"<?php echo set_select('currency', 'TRY'); ?> >TRY</option>
</select>
但不幸的是,表单验证失败后,它不显示选定的值。为什么这个基本的set_select()方法不工作?在使用 set_value()之前,我已经在其他一些字段中使用过了。
But unfortunately it is not showing selected value after failed form validation. Why this basic set_select() method is not working? I have used this in some other fields and all that working fine
推荐答案
/ code>, set_select()
, set_checkbox()
,您必须将这些字段传递到验证,即使不需要/验证。
Before using set_value()
, set_select()
,set_checkbox()
, set_radio()
, you have to pass those fields to validation even if not required / validated.
这篇关于set_select()帮助函数不工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文