question about quickform behaviour
| From: | Hans Westerbeek | Date: | Mon, 05 May 2003 13:13:26 +0000 |
| Subject: | question about quickform behaviour | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-5238@lists.php.net to get a copy of this message | ||
Hi all,
I am trying to let htmlspecialchars() modify a the value of a quickform text element, like this:
$headingElement =& $form->getElement('heading');
$val = htmlspecialchars($headingElement->getValue());
$headingElement->setValue($val);
///
after this the value of the element has been correctly changed, but when I retrieve its value for storage elsewhere in my app, the old value is returned. I can see that _submitValues still holds the old value.
So i guess my question in short is: How should I modify the value of an element *before* i call the form's validate()?
Thanks for your time,
hans
PS: The reason why I need to do this is that as part of my validation process, i have to check for the xml validity of the input, in case you where wondering.