splitting grouped element in a Sigma template.
| From: | Mathieu Jobin | Date: | Fri, 29 Oct 2004 00:18:12 +0000 |
| Subject: | splitting grouped element in a Sigma template. | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-15204@lists.php.net to get a copy of this message | ||
Hello,
i'm using an ITStatic render with a Sigma template in a HTML_QuickForm_Page
for a controller.
and I can't get my radio's to be displayed exactly where I want.
$radios[] =& $this->createElement('radio', null, null, "Label 1",
"val1");
$radios[] =& $this->createElement('radio', null, null, "Label 2",
"val2");
$radios[] =& $this->createElement('radio', null, null, "Label 3",
"val3");
$this->addGroup($radios, "radioname", "global label:");
this works great, only one problem, I can't access my element individualy in
my template.
I output them using {form_radioname_html}, but this will output all of them.
I tried {form_radioname_1_html} or {form_radioname_val1_html}
nothing work.
I could specify a name like
$radios[] =& $this->createElement
('radio', 'option1', null, "Label 1", "val1");
and access it like that {form_radioname_option1_html}
which works, but in HTML, it makes something like
<input name="radioname[option1]">
so, they are kinda not grouped anymore, and all my radio can be click at the
same time. please retrieving the data out of this array would not be exactly
what I want. so, this solution does not work really well.
I got the suggestion to put a seperator while adding the group, like.
$this->addGroup($radios, "radioname", "global label:",
'<br>');
but the actual separator I would need would be ...
way to scary : "</td></tr><tr><td valign='top'>"
it totally breaks the MVC model, and so does not work.
QFC / Sigma must offer a variablename to access each radio individualy, no ?
would you reply, please include me in the CC: list, as I am not a member of
the mailling list.
thanks.
--
Mathieu Jobin
Combustion Labs Media Inc.
www.combustionlabs.com
email: mjobin@combustionlabs.com
Direct Line: 604-639-4249
Switchboard: 604-264-1999
Toll Free Phone: 1-866-COMBUST (1-866-266-2878), Ext. 105
Fax: 604-608-3418
Toll Free Fax: 1-800-689-4920
----------------------------------------------------------------------------------------------
This email is confidential and may contain privileged information.
If you are not the intended recipient please notify us immediately
by telephoning 1-866-COMBUST.