Re: QuickForm - adding Javascript Confirm

From: Date: Sun, 18 Sep 2005 16:19:39 +0000
Subject: Re: QuickForm - adding Javascript Confirm
References: 1 2 3  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-21025@lists.php.net to get a copy of this message
Hi, Charles Kline wrote:
Before asking a question "How do I do foo with QuickForm" you should answer a question "How do I do foo *without* QuickForm". Do you know how to do an alert? Do you know how to call some function on form submit?
Hi Alexy,
Why do people tend to mangle my name? It's spelled "Alexey", not "Alexy" and pronounced ah-li-KSEI. This is not a diminutive, as you may imply, unlike e.g. Charlie or Johnny, the diminutive for Alexey will be Alyosha or Lyosha.
I do know how to do foo without QuickForm. What I am not sure I guess really, is how to add the event handler to the checkbox. Like, how do I add an onClick() to the checkbox element?
You should pass it in the $attributes array: $form->addElement('checkbox', 'foo', 'A checkbox:', 'check me', array('onclick' => 'whatever you want'));

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