0

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.

2
Contributors
4
Replies
20
Views
3 Years
Discussion Span
Last Post by ravi142
-1

I have same problem Link

Solution: It's work..

Add Blank Rule.

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

-1

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>

0

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

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.