pear quickform multiple checkbox checked


/ Published in: PHP
Save to your folder(s)



Copy this code and paste it in your HTML
  1. $checkobj = array();
  2. foreach($Categories as $h => $ValueC){
  3. $checkobj = HTML_QuickForm::createElement('checkbox', $h ,null ,utf8_encode($ValueC['category']));
  4. if(count($CategoryGroups) > 0){
  5.  
  6. foreach ($CategoryGroups as $KeyC => $ValC) {
  7. if($ValueC['id'] == $KeyC){
  8. echo "<pre>";
  9. print_r($KeyC);
  10. echo "</pre>";
  11. $checkobj->setChecked(true);
  12. }
  13. }
  14. }
  15. $checkboxen[] = $checkobj;
  16. }
  17. $form->addGroup($checkboxen, 'categ', $_lang['daten']['category'], '', true);

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.