Back to Home: PHP FormMail Generator I Need Help : Ask Question Without Registration

How to display Radio and Checkbox options at the same line?
  • admin March 2011
    From User:

    I have a list of 5 check boxes. They are currently displayed one per line, and I want them to be in a row across the page. Is this an easy fix?

    Answer:

    Yes. You can just use one line of css to hide the <br> tags. For example, you have a checkbox field like this :

    <li class='field_block' id='field_8_div'><div class='col_label'>
        <label class='form_field'>Checkboxes</label> <label class='form_required' >&nbsp;</label> </div>
        <div class='col_field'>
        <?php phpfmg_checkboxes( 'field_8', "Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday" );?>
        <div id='field_8_tip' class='instruction'></div>
        </div>
    </li>

    You can edit css in the form.php, just add the following css :

    #field_8_div br{
        display:none;
    }

    It will do the trick. See the screenshot here :

    image
    Attachments
    display-checkbox-options-inline.jpg 73K