QuickForm: Problems with client-side validation

From: Date: Mon, 01 Nov 2004 09:43:52 +0000
Subject: QuickForm: Problems with client-side validation
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-15260@lists.php.net to get a copy of this message
Hi, I have a problem with the client-side validation of QF. I use the following code to activate the client-side validation. $form->addRule($name, $message, $type, $format, "client"); When I process the form, I get the following error in the Mozilla javascript console: Error: validate_form is not defined In the HTML Code of the form tag QF has added the following code: onsubmit="return validate_form(this);" The problem is, that the javascript code with the function validate_form() is not available in the HTML code. I read in the manual, that "If you want client-side validation, QuickForm can generate the javascript code needed." So I thought adding the "client" parameter to the addRule() function is all I need to do, to use the client-side validation. Is this wrong? If this is wrong, what do I have to do, to use the client side validation properly? Thanks for any help. Best regards, Ralf

« previous php.pear.general (#15260) next »