Jump to content

mipetala

New Members
  • Posts

    4
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

mipetala's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. It can't be only me who is having this problem. Any idea? nothing? nada?
  2. Hi! I want to have some elements checked by default depending on the value in database. My problem is that if one element of the array gets checked then all the other elements become also checked. For example: $checkbox = new Zend_Form_Element_MultiCheckbox(self::SELECT, array('Decorators'=>array('ViewHelper', 'Errors', 'Label', array('HtmlTag', array('tag'=>'div', 'class'=>'select_surveillance')))) ) ; foreach($this->_accountListGroups as $i => $value) { if($value->getSurveillance()) { $checkbox->addMultiOption($i , value->getDisplayName())->setAttrib("checked", "checked"); } $checkbox->addMultiOption($i , $value->getDisplayName()); } Although I have just one $value->getSurveillance() == true, I get the following result: <div class="select_surveillance"> <label for="select-3"><input type="checkbox" name="select[]" id="select-3" value="3" checked="checked" />Customer1 gw140</label><br /> <label for="select-8"><input type="checkbox" name="select[]" id="select-8" value="8" checked="checked" />Customer1 gw70</label><br /> <label for="select-4"><input type="checkbox" name="select[]" id="select-4" value="4" checked="checked" />Customer2 gw140</label><br /> <label for="select-5"><input type="checkbox" name="select[]" id="select-5" value="5" checked="checked" />Customer3 gw140</label> </div> Does anyone know another way to check some of my checkboxes?
  3. Unfortunately this doesn't work for me: $area->setValue(array('2', '5'));
  4. Dear Ranjuvs, I have the same problem. Have you found a solution? If so, would it be possible to share with us? Thanks in advance.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.