Re: Re: QF with Smarty

From: Date: Fri, 14 Nov 2003 18:11:10 +0000
Subject: Re: Re: QF with Smarty
References: 1 2  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-8953@lists.php.net to get a copy of this message
ahh i thought it was my mistake - was going crazy over this ;-) yes, i'll write a bug-report. i don't think that the seperators will work, becuse i need other form-elements between the radio buttons. something like: o no picture o upload picture |file input box| o use existing stephan Thomas Schulz wrote:
Stephan Wentz wrote in php.pear.general:
I'm trying now for 2 hours to get this working, am I missing something? The goal is to have 3 Radio Buttons, not in a row but placed each on a different location. <php> $pic1[] = &HTML_QuickForm::createElement('radio', null, null, 'No Pic', 'no'); $pic1[] = &HTML_QuickForm::createElement('radio', null, null, 'Upload Pic', 'upload'); $pic1[] = &HTML_QuickForm::createElement('radio', null, null, 'Use existing', 'use'); $form->addGroup($pic1, 'pic1', 'Picture 1:'); </php> Now if I want to output every RadioButton in a Smarty Template, how can i manage to output every Radiobutton-Element directly, not the whole group? {$form.pic1.html} works of course, but how can i access the radio-element? {$form.pic1.no.html} doesn't work, {$form.pic1.0.html} doesn't work, too.
If you want to access the elements inside a group directly, you currently must give them a name. But this works not as expected with a grouped radio elements because an element name "destroys" the group behavior in the rendered html. Please file this as Bug. http://pear.php.net/bugs/report.php?package=HTML_QuickForm We can try to make {$form.pic1.0.html} working, but somthing like {$form.pic1.no.html} should then also work. Maybe by using the value or unset the name... As an Workaround: Have you played with an array of different separators? $form->addGroup($pic1, 'pic1', 'Picture 1:', array('&nbsp;', '<br />')); ThS.


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