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

Popular posts from this blog

java - SNMP4J General Variable Binding Error -

windows - Python Service Installation - "Could not find PythonClass entry" -

Determine if a XmlNode is empty or null in C#? -