Textarea using set_value not populated Codeigniter Textarea using set_value not populated Codeigniter codeigniter codeigniter

Textarea using set_value not populated Codeigniter


Textarea doesn't have a value attribute.

<textarea name="description">       <?php echo set_value('description'); ?> </textarea>


If value return only form_validation:

<?=form_textarea(array('name'=>'description'),set_value('description'));?>

If the value is elsewhere:

<?=form_textarea(array('name'=>'description'),set_value('description',$value));?>

Documentation CodeIgniter:https://www.codeigniter.com/user_guide/helpers/form_helper.html

form_textarea() This function is identical in all respects to the form_input() function above except that it generates a "textarea" type. Note: Instead of the "maxlength" and "size" attributes in the above example, you will instead specify "rows" and "cols".