CodeIgniter Forums
Problem with re-populating SELECT and TEXTAREA fields - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21)
+--- Thread: Problem with re-populating SELECT and TEXTAREA fields (/showthread.php?tid=20289)



Problem with re-populating SELECT and TEXTAREA fields - El Forum - 07-04-2009

[eluser]Docmo[/eluser]
Hi,

The re-poplulating of the select and textarea fields doesn't work, i did what the documentation say though!

My code :

Code:
<tr> <td>Description</td><td>&lt;textarea name="description" cols="30" rows="10" value="&lt;?php echo set_value('description'); ?&gt;"&gt;&lt;/textarea></td></tr>

<tr> <td>Catégorie</td><td><select  name="categorie">
      <option value="Agriculture" &lt;?php echo set_select('categorie', 'Agriculture');?&gt;>Agriculture</option>
      <option value="Babysitting" &lt;?php echo set_select('categorie', 'Babysitting');?&gt;>Babysitting</option>
      <option value="Education" &lt;?php echo set_select('categorie', 'Education');?&gt;>Éducation</option>
    </select>
    </td></tr>

Do you see the error ?

Thx!


...


Problem with re-populating SELECT and TEXTAREA fields - El Forum - 07-04-2009

[eluser]Colin Williams[/eluser]
Textareas don't have a value property. You put the value in between the opening and closing tags

Code:
&lt;textarea&gt;&lt;?= set_value($text) ?&gt;&lt;/textarea&gt;



Problem with re-populating SELECT and TEXTAREA fields - El Forum - 07-04-2009

[eluser]Docmo[/eluser]
Oops, yes you're right. Any idea for the select field ?


...


Problem with re-populating SELECT and TEXTAREA fields - El Forum - 07-04-2009

[eluser]Docmo[/eluser]
Forget it, i solved the problem Smile thx!


...


Problem with re-populating SELECT and TEXTAREA fields - El Forum - 07-28-2009

[eluser]nigwoko[/eluser]
Thanks Colin!