callback result in a QuickForm form
| From: | Mos | Date: | Sun, 14 Nov 2004 21:47:41 +0000 |
| Subject: | callback result in a QuickForm form | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-15494@lists.php.net to get a copy of this message | ||
I have a problem to obtain the value returned by the call back function in a
QuickForm form :
1/
function do_showitem($values)
{
do something...
$result="OK"
return $result;
}
2/php script :
$form_link = new HTML_QuickForm('frmLink', 'POST', "showitem.php",
'', '',
true);
$form_link->addElement('text', 'related_faq', 'Add Related Faq :
','size="40"');
................................
$form_link->addElement('submit', 'btnRelFaqSubmit', 'Add');
if ($form_link->validate())
{
$result2 = $form_link->process('do_showitem',true);
print $result2;
}
My problem is that $result2 contains nothing. I guess it is just a mistake
somewhere, but I do not see where...
How to obtain the value returned in the call-back function above ?
@+
Mos