Re: QuickForm Error message
| From: | Ignatius Reilly | Date: | Thu, 02 Mar 2006 11:53:24 +0000 |
| Subject: | Re: QuickForm Error message | ||
| References: | 1 2 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-23200@lists.php.net to get a copy of this message | ||
In many cases when you have to implement such rules you will find the PEAR HTML_Javascript_Convert class very useful.
"A class for converting PHP variables into JavaScript variables"
Alexey Borzov thus spake on 2006-03-02 10:13:
Hi, cwhisperer wrote:I registered a new rule as well as new function and added the rule as shown in the following snippet: $form->registerRule('chk_reseller_id','function','reseller_id'); $form->addRule('txtreseller','Invalid ResellerID!','chk_reseller_id',null,'client'); It works correct except for the error message which is not shown as javascript alert but in the form. What is wrong?You need a javascript function with the same name (reseller_id) in your form. QuickForm cannot write it for you.