populate dropdown in codeigniter form using set_value

前端 未结 5 376
深忆病人
深忆病人 2021-01-03 11:30

i have a form that uses a drop down and im using codeigniter , form helper and form validation so when i get a validation error in my form , all the correctly entered fields

5条回答
  •  没有蜡笔的小新
    2021-01-03 12:21

    It's because you have to use the set_select() function , not the set_value();

    You can check that here: http://codeigniter.com/user_guide/helpers/form_helper.html

    And the right syntax:

    EDIT :

    
    

    If you have a default value, that should go in the 2. parameter for set_select.

    I hope this will work.

提交回复
热议问题