Re: QuickForm_HTML group rendering

From: Date: Wed, 21 Sep 2005 18:19:25 +0000
Subject: Re: QuickForm_HTML group rendering
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-21069@lists.php.net to get a copy of this message
Charles Kline wrote:
Hi again, Okay... hopefully last QF question for a while... In my form, I want to have a group of text fields in a table. The top row of the table will be like: <table> <tr><th>Name</th><th>Title</th></tr> then I will have like 6 rows of name and title fields: <tr><td><input type="text" name="name1"></td><td><input type="text" name="title1"></td></tr> <tr><td><input type="text" name="name2"></td><td><input type="text" name="title2"></td></tr> <tr><td><input type="text" name="name3"></td><td><input type="text" name="title3"></td></tr> <tr><td><input type="text" name="name4"></td><td><input type="text" name="title4"></td></tr> </table> I am using the default renderer and I am not sure how to create this group. Anyone clue me in? Thanks, Charles
If it is an option, use div elements instead of table ones. Nesting of divs maps well with templates: <div class="row"> <div class="elt"><input type="text" name="name1"></div> <div class="elt"><input type="text" name="title1"></div> </div> Then each line is a group, to which you assign: - a group template: <div class="row"> {content} </div> - a group element template: <div class="elt">{label}&nbsp;{element}</div> // or such HTH Ignatius

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