CodeIgniter select_value in form_dropdown

前端 未结 6 1816
-上瘾入骨i
-上瘾入骨i 2020-12-18 12:31

I have a dropdown field in my form and when I hit submit the form goes through validation and if an error happens, return all the value. This work expect for my dropdown meu

6条回答
  •  佛祖请我去吃肉
    2020-12-18 13:08

    With form_dropdown, you have to use set_select instead of set_value

    CodeIgniter documentation

    If you want to set the default value on form_dropdown, pass an array which contains defaults value as the third parameter to the form_dropdown function.

提交回复
热议问题