Hello Everyone.

I have make Form with use of set_value('Name'); in codeigniter
but In Input type Textarea not given value.

Code:

<?php

$last_goals = '';
if($this->session->userdata('user_from') == 'log') //After login value come From db                     
{
    $last_goals = $getdesired[0]->ds_goals;
}
else
{
    $last_goals = set_value('career_goals');  // without login this value come
}

$data = array('id'=>'id_career_goals',
    'name'=>'career_goals',
    'cols'=>'40',
    'rows'=>'10',
    'value'=>$last_goals);

echo form_textarea($data);

?>

Any can suggest me what wrong with me.

Thank you.

I have same problem Link

Solution: It's work..

Add Blank Rule.

$this->form_validation->set_rules('field_name', '', '');

In textarea you are trying to echo set_value() similar to input field.but in textarea value can retain only if you giving the value between<textarea><?php echo set_value('name'); ?></textarea>

I know about <textarea><?php echo set_value('name'); ?></textarea> but i want to put in above code.that why i have post code.