php - Convenient way to populate fields in codeigniter -
codeigniter has convenient way repopulate field on validation failure
set_value() in app want allow user edit entity using same form use create it. cannot use set_value() populate fields while form in editing mode.
i there convenient way it.
thanks.
you give set_value() second parameter initial value on loading.
i using @ supress errors if piece of data not exist
set_value('input_name',@$input_value); for this, form element prefilled $input_value if exists
Comments
Post a Comment