Welcome Guest, Not a member yet? Register   Sign In
Problem with re-populating SELECT and TEXTAREA fields
#1

[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!


...
#2

[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;
#3

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


...
#4

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


...
#5

[eluser]nigwoko[/eluser]
Thanks Colin!




Theme © iAndrew 2016 - Forum software by © MyBB