Welcome Guest, Not a member yet? Register   Sign In
TEXTAREA in a form does not have a VALUE parameter like the INPUT fields. So...
#1

[eluser]cobolCowboy[/eluser]
the following code does not offer persistence of the text in the TEXTAREA.
Code:
<label for="comments">Comments / Questions</label><br />
    &lt;textarea name="comments" id="comments" value="&lt;?php echo set_value('comments'); ?&gt;" rows="4" cols="75"&gt;&lt;/textarea><br />
        &lt;?php echo form_error('comments', '<span class="err2">', '</span>'); ?&gt;<br />


If there is an error on the form, the text in the textarea is lost.
Is there a suggested solution to that?
#2

[eluser]Mark Price[/eluser]
Textareas do not have a value attribute. It should be formatted like this:
Code:
&lt;textarea name="comments" id="comments" rows="4" cols="75"&gt;&lt;?php echo set_value('comments'); ?&gt;&lt;/textarea&gt;
#3

[eluser]cobolCowboy[/eluser]
That was simple enough. duh!
Thank you so much, and have a great day.




Theme © iAndrew 2016 - Forum software by © MyBB