Jump to content

[SOLVED] multiple checkbox selections within ooh forms


bradkenyon

Recommended Posts

I am trying to create multiple checkboxes in a form.

 

Here is the code I have right now, right now it displays one checkbox.

 


//this is what i use in an include file
   $f->ae(DF_xfield1($q->f('xfield1'),$xtra2));

//this is what i use to display it on the form
<div><label>Areas of Interest:</label>
<?PHP $mf->se("D_xfield1"); ?></div>

//this is the function i try to get going to display multiple checkboxes, with names by each one
function DF_xfield1 ($v)
{
$flabelss = array (array('label'=>'Childrens Area','value'=>'Childrens Area'),
                   array('label'=>'Medium','value'=>'Medium'),
                   array('label'=>'Large','value'=>'Large'),
                   array('label'=>'X-Large','value'=>'X-Large'),
                   array('label'=>'2X-Large','value'=>'2X-Large'),
                   array('label'=>'3X-Large','value'=>'3X-Large'));

	return array("type"=>"checkbox",
		 		"name"=>"D_xfield1",
		 		"options"=>$flabelss,
				"multiple"=>124,
		 		"size"=>11,
		 		"extrahtml"=>$xtra2,
		 		"value"=>'$v');
}

 

 

I looked this up somewhere, and and tried applying it to above:

$f->add_element(array("type"=>"checkbox",
                             "name"=>"compress",
                             "multiple"=>1));

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.