Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. Linux, Apache, MySQL, PHP
  4. multiple checkbox

multiple checkbox

Scheduled Pinned Locked Moved Linux, Apache, MySQL, PHP
phptutorialquestion
2 Posts 2 Posters 2 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    rose196
    wrote on last edited by
    #1

    Hi all Using zend framework how to create multiple checkbox? Can any one tell me Thanks in advance, rose

    J 1 Reply Last reply
    0
    • R rose196

      Hi all Using zend framework how to create multiple checkbox? Can any one tell me Thanks in advance, rose

      J Offline
      J Offline
      jceresini
      wrote on last edited by
      #2

      If you are just looking to create multiple checkboxes you can use the same command to make 1 check box over and over until you have the number of checkboxes you want:

          $ispublic = new Zend\_Form\_Element\_Checkbox('chkbox1');
          $ispublic->setLabel('Check box label')
                   ->setAttrib('id','chkbox1');
      

      I have a feeling though, that you are looking to put radio buttons on your form. Here is an example of creating radio buttons:

      $staffname = array('Jim', 'John');
      $staff = new Zend_Form_Element_Radio('staff');
      $staff->setRequired(true) // field required
      ->setValue('R') // first radio button selected
      ->setMultiOptions($staffname); // add array of values / labels for radio group
      $form->addElement($staff);

      More information can be found here: http://www.davidkelly.ie/blog/2008/06/18/zend_form-radio-buttons/[^] Joe Ceresini Network Engineer jceresini@hostmysite.com Hostmysite.com

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups