Re: Quickform layout and groups.

From: Date: Wed, 05 Apr 2006 14:43:00 +0000
Subject: Re: Quickform layout and groups.
References: 1 2  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-23544@lists.php.net to get a copy of this message
On 4/4/06, Paolo Sala <piviul@riminilug.it> wrote: > You have to change the default renderer; try to read this sections: > > http://pear.php.net/manual/en/package.html.html-quickform.intro-renderers..php > Yep, it's not going to be trivially easy to do this. You *may* be able to extend the default renderer todo this, perhaps by setting up an HTML_Table object or storing the values, but the default rendering definately doesn't do this specifically. > > Tudor Holton scrisse in data 04/05/06 08:36: > > > Hello, > > > > First, let me thank you for all your great work on Pear and, more > > specifically HTML_QuickForm! :-) > > > > I have been playing with HTML_QuickForm for a few days and have been > > trying to reproduce some of our existing forms. > > > > I have come across an interesting problem that I can't seem to get > > around. > > > > Our forms have fields placed in rows, and aligned so that the form > > fits a square. To do this in HTML_QuickForm, I placed each line in a > > group. > > > > However, when I do this, the labels for each field disappear. > > > > What I'm trying to do is something like this: > > <table> > > <tr> > > <td>Name:</td> > > <td>First:<br /><input type="text" name="firstName" > > /></td> > > <td>Middles:<br /><input type="text" > > name="middleNames" /></td> > > <td>Last:<br /><input type="text" name="lastName" > > /></td> > > </tr> > > <tr> > > <td>Address</td> > > <td><input type="text" name="address" /></td> > > </tr> > > </table> > > > > However, a closer approximation to our existing forms is like this: > > <table> > > <tr> > > <td rowspan="2">Name:</td> > > <td align="left">First:</td> > > <td align="left">Middles:</td> > > <td align="left">Last:</td> > > </tr> > > <tr> > > <td align="left"><input type="text" > > name="firstName" /></td> > > <td align="center"><input type="text" > > name="middleNames" /></td> > > <td align="right"><input type="text" > > name="lastName" /></td> > > </tr> > > <tr> > > <td>Address</td> > > <td><input type="text" name="address" /></td> > > </tr> > > </table> > > > > > > > > The end result is that each field has its label above rather than > > beside, but only when the elements are grouped! > > > > Is there a way to do this in HTML_QuickForm? > > > > More generally, where should I look for making my forms look tighter? > > One line per field makes for some very long forms, yet grouping > > doesn't seem to be quite what I'm looking for. > > > > I have tried looking at templates, but it all seems a bit confusing > > and overcomplicated for something simple like this. > > > > Another way to look at it would be to add a formatting to each of the > > group's elements and tell it to place the label above, > > then tell the group to show the elements labels. How would I go about > > doing this? > > > > I'd imagine I'm missing something quite obvious, so I apologise in > > advance if the answer is too obvious. :-) > > > > You help is greatly appreciated. > > > > Cheers, > > Tudor. > > > > -- > PEAR General Mailing List (http://pear.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- Justin Patrin

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