Re: Quickform javascript rules

From: Date: Wed, 06 Aug 2003 20:03:34 +0000
Subject: Re: Quickform javascript rules
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-7071@lists.php.net to get a copy of this message
Hi! Mike Carter wrote:
I've got two text fields on a Quickform and would like to ensure their contents are equal upon submission. The twist is i want to do this test on the client side, in javascript. How do i go about adding a javascript rule function to the Quickform?
The same way as you add the server-side function... 1) Write a JavaScript function for validation 2) Register it via registerRule() 3) Add a rule of this type with a 'client' modifier

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