Re: QuickForm Multiple Rendering of elements in standard HTML- Possible?

From: Date: Sun, 28 Nov 2004 06:39:07 +0000
Subject: Re: QuickForm Multiple Rendering of elements in standard HTML- Possible?
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-15864@lists.php.net to get a copy of this message
On Sat, 27 Nov 2004 23:35:00 -0600, Jim Tom Polk <datdone@camalott.com> wrote: > Is is possible to display or render QuickForm elemnts IN the HTML > structure of a web page, somehow having them bound together so that you > could display/render the beginning of the form and it's attributes, then > the elements IN a table. > > It would be like for each element have it rendered as bare, with rules > and filters, then display, over and over again, yet linked? > > The reason is that I want to more accurately show where they will > actually appear in a web pages design, in a WYSIWYG environment, rather > than programming the template and the elements. > > I have found that I find describing what I want the HTML to look like > with programming is easy, but is very difficult to imagine for many people. > > What I am trying to do is embed QuickForm into a WYSIWYG environment as > much as possible. The environment is Adobe GoLive. > > Basically, I'm at the point where I can put a rectangle into a page, the > rectangle being defined as a custom HTML element and inside it, PHP > coding that when the rectangle has focus, you will be able to "inspect" > it to modify strings using a GUI dialog. > > Something like this: > > <glp.el><?php > $GLPuploadFORMNAME->addElement('text','title','Title:'; > $GLPuploadFORMNAME->addRule('title','You must supply a > title','required'); > $GLPuploadFORMNAME->applyFilter('title',trim); > ?></glp.el> > > ...where FORMNAME, and the variables for addElement,addRule and > applyFilter are modified via a GUI inspector, and when the file is > uploaded, the non-valid HTML (<glp.el></glp.el>) is stripped. You put > these one after the other, add a predefined process upon validaion, and > then do display, etc. > > So, a designer could easily create a table and put the elements in it, > modifying the table attributes using famaliar tools, rather than having > to imagine and piece together what the wanted by modifying the default > tempalates. > > I hope this makes some sense, and if so, is it something tha is > possible, and if possible, would the processing overhead be to high. > Well....it is possible to use a template system to do this. You can use the Array renderer for QuickForm or the ArraySmarty renderer. You could very easily put in a placeholder in which outputs the pieces, then process the template through Smarty. See the renderer docs and examples in the QF package. -- Justin Patrin

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