NYCPHP Meetup

NYPHP.org

[nycphp-talk] Quickform: Select All Checkboxes

Mike Lynch mlynch1 at gmail.com
Tue Sep 20 12:18:56 EDT 2005


Hi All
 Thanks for the replies. I'm using the default QF renderer so I guess Tom's 
solution best fits my needs.
I was afraid was I missing something obvious in Quickform.
 Regards
 Mike

 On 9/20/05, David Mintz <dmintz at davidmintz.org> wrote: 
> 
> On Tue, 20 Sep 2005, Tom Melendez wrote:
> 
> > Hi Mike,
> >
> > It's possible that you are asking the question of, "Does QF have
> > something built-in for this, or is there a 'Quickform' way of doing
> > this?". I use QF and am not familar with their way of handling this.
> > Instead, I just output a general javascript function that takes the name
> > of the checkbox array and whether to turn them all on or off. Since the
> > function is general, it doesn't care if there is one, or 1000. The html
> > for the selectall/clearall links and the extra javascript I just add to
> > the form with the 'html' element:
> >
> > $form->addElement('html',$myhtmlstring);
> >
> > If anyone knows a better way, I'm all ears.
> 
> This might not be of interest because it sounds like you are using the
> default renderer rather than a template engine. If you're using just the
> default renderer and plan to stick with it, the above technique seems ok.
> But if you switch to a template engine, the 'html' psuedo-element probably
> will not be supported by your renderer, but you will of course have the
> ability to put your own javascript directly in the template itself.
> 
> 
> ---
> David Mintz
> http://davidmintz.org/
> _______________________________________________
> New York PHP Talk Mailing List
> AMP Technology
> Supporting Apache, MySQL and PHP
> http://lists.nyphp.org/mailman/listinfo/talk
> http://www.nyphp.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nyphp.org/pipermail/talk/attachments/20050920/8642b746/attachment.html>


More information about the talk mailing list