Hi all,
I've got a nice form working with captcha. The problem is that i cannot seem to get the value right for textareas.
If you mistype the captcha, all the fields are updated (because of a previous forum reply:
if (isset($_POST)) {
$fields = array_merge($fields, $_POST);
}
Except the textarea field doesn't work! I couldn't find any related subject on the forum.
I've set the value to the same value as input text and tried many others but that doesn't seem to work:
<td valign="top">Opmerkingen:</td><br>
<td><textarea name="comments" style="width: 100%; height: 200px" value="<?=htmlspecialchars(@$fields["comments"])?>"></textarea></td>
I hope someone can help me!
Regards, Bart
Pfew! It took me a while but i found it on a PHP forum somewhere. The value should be entered between the textarea opening and closing. This works: <td valign="top">Opmerkingen:</td><br>
<td><textarea name="comments" style="width: 100%; height: 200px" > <?=htmlspecialchars(@$fields["comments"])?></textarea></td>
I've got a nice form working with captcha. The problem is that i cannot seem to get the value right for textareas.
If you mistype the captcha, all the fields are updated (because of a previous forum reply:
if (isset($_POST)) {
$fields = array_merge($fields, $_POST);
}
Except the textarea field doesn't work! I couldn't find any related subject on the forum.
I've set the value to the same value as input text and tried many others but that doesn't seem to work:
<td valign="top">Opmerkingen:</td><br>
<td><textarea name="comments" style="width: 100%; height: 200px" value="<?=htmlspecialchars(@$fields["comments"])?>"></textarea></td>
I hope someone can help me!
Regards, Bart
(Mar 30th, 2010, 6:14 AM)bart Wrote: all the fields are updated except for the textarea field
Pfew! It took me a while but i found it on a PHP forum somewhere. The value should be entered between the textarea opening and closing. This works: <td valign="top">Opmerkingen:</td><br>
<td><textarea name="comments" style="width: 100%; height: 200px" > <?=htmlspecialchars(@$fields["comments"])?></textarea></td>