RE: [fw-general] Zend_Form: MultiCheckbox or Checkbox i.c.w. ViewScript and looping through individual elements

2009-03-10 Thread fire-eyed-boy
->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

Re: [fw-general] Zend_Form: MultiCheckbox or Checkbox i.c.w. ViewScript and looping through individual elements

2009-03-06 Thread Mon Zafra
( 'products ) > ->setAttribs( array( 'class' => 'check' ) ) > ->setMultiOptions( $productList ) > ->setSeparator( ' ' ); > > But these decorator settings have no affect, it will still render the > checkbox elements like (notice

RE: [fw-general] Zend_Form: MultiCheckbox or Checkbox i.c.w. ViewScript and looping through individual elements

2009-03-06 Thread fire-eyed-boy
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.

Re: [fw-general] Zend_Form: MultiCheckbox or Checkbox i.c.w. ViewScript and looping through individual elements

2009-03-06 Thread Mon Zafra
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

RE: [fw-general] Zend_Form: MultiCheckbox or Checkbox i.c.w. ViewScript and looping through individual elements

2009-03-06 Thread fire-eyed-boy
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.

Re: [fw-general] Zend_Form: MultiCheckbox or Checkbox i.c.w. ViewScript and looping through individual elements

2009-03-06 Thread Mon Zafra
general] Zend_Form: MultiCheckbox or Checkbox i.c.w. > ViewScript and looping through individual elements > > > Sorry guys, forgot to send to fw-gene...@lists.zend.com. So here you go: > > -- > From: fire-eyed-...@hotmail.com > To: mon...@gmail.co

RE: [fw-general] Zend_Form: MultiCheckbox or Checkbox i.c.w. ViewScript and looping through individual elements

2009-03-06 Thread fire-eyed-boy
vidual elements 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 200

Re: [fw-general] Zend_Form: MultiCheckbox or Checkbox i.c.w. ViewScript and looping through individual elements

2009-03-06 Thread Mon Zafra
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

RE: [fw-general] Zend_Form: MultiCheckbox or Checkbox i.c.w. ViewScript and looping through individual elements

2009-03-05 Thread fire-eyed-boy
> 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

Re: [fw-general] Zend_Form: MultiCheckbox or Checkbox i.c.w. ViewScript and looping through individual elements

2009-03-05 Thread Matthew Weier O'Phinney
-- 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