Re: QuickForm w/ITX Help

From: Date: Tue, 15 Jul 2003 22:10:27 +0000
Subject: Re: QuickForm w/ITX Help
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-6618@lists.php.net to get a copy of this message
<jackson@coldfeetcreative.com> wrote : > I have been using QuickForm with the ITX on a project and it has been going > great. However I have come to a form that I am not sure how to do.. Our > process dictates that the UI is created first and then I make it work. Here > is what I am trying to do. > > The form will have a collection of elements that make up a group. The goal of > the form is to be able to configure the fields that will be displayed, their > order, and whether or not they are required. the results of this form will > be displayed as another form that I have already created. > > I am posting below a couple of example group/rows from the form that I need to > create. In this example I need to the form to allow a user to set attributes > about the 2 available fields in the database. Field 1 is a textbox on the > other form. The textbox is displayed simply for the user knowing what type > of element they are talking about so it has been disabled. The same holds > true for Field 2. > > <tr> > <td><input type="text" name="field1_order" > value="1"></td> > <td>Field 1</td> > <td><input type="text" name="field1" disabled></td> > <td> > <input type="checkbox" name="field1_required" > value="1"> require this > field<br /> > <input type="checkbox" name="field1_hide" value="1"> > hide this field > </td> > <td><input type="submit" name="field1_delete" > value="delete"></td> > </tr> > > <tr> > <td><input type="text" name="field2_order" > value="2"></td> > <td>Field 2</td> > <td> > <select name="field2" disabled> > <option value="A">A</option> > <option value="B">B</option> > </select> > </td> > <td> > <input type="checkbox" name="field2_required" > value="1"> require this > field<br /> > <input type="checkbox" name="field2_hide" value="1"> > hide this field > </td> > <td><input type="submit" name="field2_delete" > value="delete"></td> > </tr> > > I have been through all the examples and have been experimenting all day and > haven't been able to figure it out. Any help will be greatly appreciated.. I > am guessing this has to do with groups, but I can't seem to grasp it. From what I think I understand, I would say it's possible. Use the ITXDynamic renderer. Look at the renderer examples, especially the one with a green block. There is also some docs here: http://www.appelsiini.net/~tuupola/php/peardoc2/package.html.html#package.ht ml.html-quickform And here: http://www.appelsiini.net/~tuupola/php/peardoc2/package.html.html-quickform.. html-quickform-renderer-itdynamic.html And this renderer method might help: setElementBlock() Good luck, Bertrand Mansion Mamasam

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