For Programmers: Free Programming Magazines  


Home > Archive > PHP Pear > April 2006 > HTML_QuickForm setElementTemplate() question









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author HTML_QuickForm setElementTemplate() question
jreinke@cleversafe.com

2006-04-07, 9:59 pm


Greetings all,

First off, this list has been a tremendous help to my QuickForm experience. (Timothy Marsolais -- you helped me a ton)

However, I seem to be having trouble solving this problem efficiently, and I was wondering if any of you have had similar experiences. My problem, is that I can not use the $renderer->setElementTemplate() function, because each of my elements contains different information. If you can imagine 3-4 different service plans displayed on a form, each with different labels/values and what not that I'm pulling interactively from the database.

The problem is two fold. I try to insert the values in a few for loops using commands like $form->addElement('html', '<p>$whatever</p>'), but I find this just adds all the html to the beginning of the form (before the element is printed out), resulting in a correct formatting, but all of the radio buttons are naked at the bottom of the form. Then, when I try to create a new elementTemplate() for each of the 3-4 radio buttons, they only inherit the attributes from the last elementTemplate I made. I'm hoping theres something I can do for this situation, and would greatly appreciate any advise. Thanks again in advance!


_____________________
James Reinke

CLEVERSAFE

jreinke@cleversafe.com
_____________________
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com