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));

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

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