Re: [QuickForm] Multi-column tables

From: Date: Fri, 16 Jan 2004 15:57:52 +0000
Subject: Re: [QuickForm] Multi-column tables
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-10183@lists.php.net to get a copy of this message
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Friday 16 January 2004 10:01, Colin Viebrock wrote: > I'm considering moving some of our in-house code to use QuickForm, > and the one thing that is holding me back is the ability to easily > create true, multicolumn forms. > > By multicolumn, I mean something where the final HTML is like: > > <form ...> > <table> > <tr> > <td>First Name</td> > <td>Last Name</td> > <td>Gender</td> > </tr> > <tr> > <td><input type="text" name="firstname[1]"></td> > <td><input type="text" name="lastname[1]"></td> > <td><select name="gender[1]"> > <option value="m">Male</option> > <option value="f">Female</option> > </select></td> > </tr> > <tr> > <td><input type="text" name="firstname[2]"></td> > <td><input type="text" name="lastname[2]"></td> > <td><select name="gender[2]"> > <option value="m">Male</option> > <option value="f">Female</option> > </select></td> > </tr> > ... etc ... > </table> > </form> > > I've tried doing this with groups, but it doesn't provide the same > layout precision. Plus, I think you can only have an error on the > group, not on an individual elements of the group. > > I'd also like to be able to do this without having to put too much > renderer logic into my pages. > > Has anyone successfully implemented this? > > - Colin This is a good opportunity for you to use templates. QuickForm happily co-exists with a number of template systems (Flexy and Smarty are two that come to mind). Take a look at the QuickForm documentation directory under 'renderers'. - -- James 'Chip' Kaufman jkaufman@wamnetgov.com 952-346-3532 PGP key: 697D43DE -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQFACAoArlGDUWl9Q94RAle/AJ9JtxU5yl8ye+GUXC5DQk6Y6rDJxQCfbLFh RX0FHHaOwTPdO9H/LKjWcM8= =pkdi -----END PGP SIGNATURE-----

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