Hi lsoares2011 ,
It is a simple question. But the answer isn't simple.
First off - I'm assuming that this is ChronoForms v4 and not v3.2???
If it is then you can get this to work by editing the form HTML directly by clicking the name link in the Forms Manager. Once you have done this you will no longer be able to edit the form inputs in the Wizard Edit.
There is an alternative fix that will work with the Wizard but it involves hacking the code so I don't recommend it. I will post the code below so for reference though -- hopefully it will find it's way into a future release.
Bob
Hack to allow checkbox options to be in column or list form
In html_helper.php find the checkbox_group section around line 230 and replace it with this version:
case 'checkbox_group':
unset($fieldoptions['value']);
$fieldoptions['type'] = 'checkbox';
$options = array();
if(isset($tag['options']) && is_array($tag['options'])){
$options = $tag['options'];
unset($tag['options']);
$checked = false;
if(isset($tag['checked'])){
$checked = $tag['checked'];
unset($tag['checked']);
}
}
$output .= "<div class='cf_check_option_block' id='cf_check_{$fieldname}'>";
foreach($options as $k => $option){
$output .= '<span class="cf_check_option"><input type="'.$fieldoptions['type'].'" name="'.$fieldname.'[]" id="'.$this->slug($fieldname.'-'.$k).'" value="'.$k.'"'.($checked == $k ? ' checked="checked"' : '').' class="'.$tag['class'].'">'."\n";
$output .= '<label for="'.$this->slug($fieldname.'-'.$k).'">'.$option.'</label></span>'."\n";
}
$output .= "</div>";
break;
Note - changes start from the $output .= "<div . . . line
This adds a identifiable <div> around the option block and <span>s around each option.
You need to re-save the form in Wizard Edit for these changes to be applied.
The add this CSS to the Form
span.cf_check_option {
float:none;
display:block;
}
div.cf_check_option_block {
float:left;
}
This will display the options as a column; you can change the layout back to a row by changing display:block; to display:inline;
There is a unique id added to the cf_check_option_block <div> that you can use to have separate blocks display differently if that is needed
Bob
Later: there is an updated version of this code for CFv4 RC1.9 and including radio groups
here