QuickForm Multiple Rendering of elements in standard HTML- Possible?
| From: | Jim Tom Polk | Date: | Sun, 28 Nov 2004 05:35:00 +0000 |
| Subject: | QuickForm Multiple Rendering of elements in standard HTML- Possible? | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-15863@lists.php.net to get a copy of this message | ||
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.
Thanks...
JimTom Polk
datdone@camalott.com
www.jimtompolk.com