Re: Quickform and templates

From: Date: Mon, 24 Feb 2003 20:25:52 +0000
Subject: Re: Quickform and templates
References: 1 2  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-13785@lists.php.net to get a copy of this message
Bertrand, The smarty container need only be a class - 2.4.2+ supports direct access to classes. This may simplify things, and in fact be more useful for people like me who need the quickform to do more than just display a form. The backend for my baby, calendar.chiaraquartet.net, is a form display engine that in essence displays reports with clickable fields that pop up a form element. In other words, only the data entry form displays all the form fields at once, modifications are done only to the fields that need modification (it's very rare that an entire record needs to be changed at once). This also allows me to control the access users have to data based on their user level. In other words, when guests log in and view a concert, they see the concert program, where it is, etc. When I log in, it displays the same program, but each piece is editable, and a hidden field (our concert fee!) is also editable. When a presenter has proposed a concert that we agree to play and logs in, they can only modify the information for tickets and the hall where we will be playing. Back when, I wrote my own template engine based on a humongous switch. Needless to say, this is going the way of the dinosaur. I'd like to be able to use quickform for the display of form elements, and the easy ability to extend a smarty wrapper object to do what I need it to do would be priceless. In my not voluminous free time, I may be able to assist with this, probably closer to summertime than any time soon. Greg "Bertrand Mansion" <bmansion@mamasam.com> wrote in message news:BA7FF6EA.5231%bmansion@mamasam.com... <jeroen@terena.nl> wrote : > Hi, > > I'm currently using quickforms and templates again (Smarty) and when the > pages get a bit more complicated the toArray() method doesn't quite cut > it anymore. Especially with selects it gets messy because the array > doesn't contain the possible values. Can you send your code, I'll have a look. > How do others work with templates and quickforms? > Bertrand, do you have a cunning plan yet for bridging templates and > QuickForm? Yep, I will but I am waiting to have the last version of IT in PEAR... And it looks like this is taking more time than I thought it would ;) My strategy will be to make a bridge object that will call different methods in different containers. Some kind of object delegation could be needed here. I plan a container for IT followed by one for Smarty, I'll probably need help for this one. I might also create a Matrix container that will put form elements into a matrix layout (some kind of table probably). It would be cool if QuickForm could switch from one container to another in the same form. In terms of timing, I won't be able to code it this week as I have a job to finish. I'll probably start next weekend. I hope it will rain ;) Bertrand Mansion Mamasam

« previous php.pear.dev (#13785) next »