PEAR::Quickform, advcheckbox

From: Date: Sat, 06 Nov 2004 18:19:59 +0000
Subject: PEAR::Quickform, advcheckbox
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-15370@lists.php.net to get a copy of this message
Hi everybody ! I created a Form with Quick Form and now I would be glad to set a link which enables to check all the advcheckbox I set. I try with javascript but it doesn't works... I have no idea how to do that through PHP (I use PEAR::Pager inside my Form too). Here is the code I use to set up the form : $form->addElement('link', 'select_all', '', '', '<img src="./check.png" border=0 alt="Select All" title="Select All">', array ('onclick' => "javascript:check_all(this.form);") ); I add a select box : $form->addElement('select', 'test', 'Status : ', array("0"=>"Choose","1"=>"Check","2"=>"Uncheck"), array ('onchange' => "javascript:this.form.submit();") ); $form->setDefaults(array('online'=>$_SESSION["test"])); Then I process this in a call-back function : foreach ($values['faq_selected'] as $test1=>$vals) { $sel =& $form->getElement("faq_selected[$test1]"); $sel->setChecked(true); } When I check the status of each checkbox I obtain true, but no tick is dispalyed in the checkbox. What is the problem ? Best regards Mos

« previous php.pear.general (#15370) next »