Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9268859
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T14:57:54+00:00 2026-06-18T14:57:54+00:00

We have an autogen form in php, the way we spit out the checkbox

  • 0

We have an autogen form in php, the way we spit out the checkbox is shown in the code below:

case FIELD_CHECK_BOX:
                $fieldHtml = printCheckbox($mode, $field->getId().'[]', $field->getOptions(), $field->getValue(), true, ' &nbsp', $isReq, array( "class"=>$isReq,$jsFunctionCalls));
            break;

the issue is, if you have five checkboxes for example, they print vertically, but I have a client that has a ton of checkboxes and wants them to print horizontally.

How can I code this to spit the checkboxes out next to each other until say five boxes have been reached and then break to the next line .

HTML Output:

<tr class="tr-11-16 tr-11" id="field-16"><td width='30%' valign='top' align='left' class='labeltext'>Requestor Email :<span style='text-decoration:none' class='required' id='lfspan'> * </span></td><td width='70%' align='left'><table border='0' style='table-layout:auto'><tr><td><div id='td-16[]'><table cellpadding='0' cellspacing='0'><tr><td class="valuetext fld-3-16-required" ><input type="checkbox" name="16[]" id="16[]" value="Home"class="valuetext fld-3-16-required" 0="">Home</td></tr><tr><td class="valuetext fld-3-16-required" ><input type="checkbox" name="16[]" id="16[]" value="Play"class="valuetext fld-3-16-required" 0="">Play</td></tr><tr><td class="valuetext fld-3-16-required" ><input type="checkbox" name="16[]" id="16[]" value="Theatre"class="valuetext fld-3-16-required" 0="">Theatre</td></tr><tr><td class="valuetext fld-3-16-required" ><input type="checkbox" name="16[]" id="16[]" value="Work"class="valuetext fld-3-16-required" 0="">Work</td></tr></table></div></td><td valign='top'></td></tr></table></td></tr>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T14:57:55+00:00Added an answer on June 18, 2026 at 2:57 pm

    Easy way is tables.

    Better way is to use display:table and its blocks.

    Best way would probably be to wrap each checkbox + label in a wrapper element, and give that element 20% width. Then each of those wrapper elements can have either display:inline-block; or display:block; float:left;

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Last week, Thursday to be exact, the autogen php/mysql web form we have has
i have checked out webkit source code from they svn server, when i issued
I have a source code of an OpenSource project which I get from SVN.
I have this following python code, it works fine in python but fails with
I have an Autogen Makefile.am that I'm trying to use to build a test
Have written all the code in a silverlight class library (dll) and linked this
Have been trying to figure this out for an hour - and still have
Have the following code: $(#blogs).mouseover( function () { $(this).addClass(hover); $(#home).removeClass(hover); $(#homepages).removeClass(hover); $(#apps).removeClass(hover); $(#facebook).removeClass(hover); $(#kontakt).removeClass(hover);
I have the below Makefile and for some reason it's dependent on a file,
Have a look at this code: #include <iostream> using namespace std; int main() {

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.