Go to content Go to navigation Go to search

People

Businesses

CakePHP Radio Fieldsets 28 February 2008

Josh needed to output a cakePHP radio button set without the radio button’s around it. We looked at the API, the docs, etc. We just could not figure it out ( 'fieldset'=>false ? or maybe 'fieldset'=>null ?). Nope.

So Josh went off looking and found out you just set 'legend'=>false in the input option’s array:

echo $form->input('user_need', array('option'=>$radios, 'legend'=>false));

…yes, a user can only have one need at a time….muwahaha

Also, you can also select which radio button is “active” on page load using “checked”=>[the value].

Sphere: Related Content

Leave a Comment