Re: HTML_QUICKFORM :: Textarea Value
| From: | Justin Patrin | Date: | Sun, 19 Jun 2005 22:47:43 +0000 |
| Subject: | Re: HTML_QUICKFORM :: Textarea Value | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-19682@lists.php.net to get a copy of this message | ||
On 6/19/05, P Botha <bothapn@lantic.net> wrote:
> Hi,
>
> I've been trying to figure out how to set the value of the textarea element in
> the HTML_QUICKFORM package.
> One can't say value="kjhkjhkjh" .The actual value needs to appear between
> the brackets of the html tag eg: <textarea>kjhkjhkjhkhjk</textarea>
>
> Any idea how this can be achieved?
>
use $form->setDefaults() to set the default value of form elements.
This is useful as it can be overridden by the posted data (say, if an
error happened, so the user doesn't have to re-do what they did).
$form->setDefaults(array('textField' => 'the value'));
--
Justin Patrin