->setMultiOptions( $productList )
->setSeparator( ' ' );
But these decorator settings have no affect, it will still render the checkbox
elements like (notice label wrapped around element):
The label
In stead of:
The label
Chee
( 'products )
> ->setAttribs( array( 'class' => 'check' ) )
> ->setMultiOptions( $productList )
> ->setSeparator( ' ' );
>
> But these decorator settings have no affect, it will still render the
> checkbox elements like (notice
ed) too well at first. But this illustrates the
workings of a decorator pattern quite vivid. I guess the Form decorator got
overwritten by the ViewScript decorator when I had it the other way around.
Which makes perfect sense. It would be silly to have ViewScript wrap around the
Form decorator.
or when I had it the
> other way around. Which makes perfect sense. It would be silly to have
> ViewScript wrap around the Form decorator. If that is even possible at all.
>
> Cheers
>
>
> ----------
> Date: Sat, 7 Mar 2009 00:55:59 +0800
>
> From: mon
gmail.com
To: fw-general@lists.zend.com
Subject: Re: [fw-general] Zend_Form: MultiCheckbox or Checkbox i.c.w.
ViewScript and looping through individual elements
I see that you're echoing the whole form. There's no need for renderForm() in
that case. Just put the Form decorator after ViewScript.
se ) . PHP_EOL; ?>
>
>
> ... etc
>
>
> Any ideas of what might be going on here?
>
> Cheers
>
> --
> From: fire-eyed-...@hotmail.com
> To: fw-general@lists.zend.com
> Date: Fri, 6 Mar 2009 16:10:53 +
> Subject: FW: [fw-
Form( false ) . PHP_EOL; ?>
... etc
Any ideas of what might be going on here?
Cheers
From: fire-eyed-...@hotmail.com
To: fw-general@lists.zend.com
Date: Fri, 6 Mar 2009 16:10:53 +
Subject: FW: [fw-general] Zend_Form: MultiCheckbox or Checkbox i.c.w.
ViewScript and looping through indi
Sorry guys, forgot to send to fw-gene...@lists.zend.com. So here you go:
From: fire-eyed-...@hotmail.com
To: mon...@gmail.com
Subject: RE: [fw-general] Zend_Form: MultiCheckbox or Checkbox i.c.w.
ViewScript and looping through individual elements
Date: Fri, 6 Mar 2009 15:58:00 +
1. My suggestion is to take the string output of
$multiCheckbox->renderViewHelper(), explode it using the separator, then
loop through each line. e.g.
$form->addElement('multiCheckbox', 'foo', array(
'multiOptions' => $options,
'separator' => '__SEPARATOR__'
));
// view script
$output = $t
> Date: Thu, 5 Mar 2009 22:43:00 -0500
> From: matt...@zend.com
> To: fw-general@lists.zend.com
> Subject: Re: [fw-general] Zend_Form: MultiCheckbox or Checkbox i.c.w.
> ViewScript and looping through individual elements
>
> -- fire-eyed-...@hotmail.com wrote
> (on
-- fire-eyed-...@hotmail.com wrote
(on Thursday, 05 March 2009, 09:19 PM +):
> Also, with the Zend_Form ViewScript decorator, I thought I would be able to
> access the form object with something like $this->form from within the view.
>
> But I'm not able to access it. How would I be able to ac
Hi y'all,
I'm using a ViewScript decorator for my Zend_Form. In this form I'ld like each
third checkbox in a collection of checkboxes to start on a newline, or in a new
block element or something similar. I tried it with a MultiCheckbox.
I wish I could do something similar as beneath in my for
12 matches
Mail list logo