Checkboxes in multiple columns

Questions and bug reports for current release of CKForms

Checkboxes in multiple columns

Postby ShrapNel » Fri Oct 23, 2009 6:54 pm

Hi Everyone...

I am needing to have a form on my site which will consist of some 150 check boxes - is it possible to get these checkboxes to appear on my website in specifically spaced columns? It will most likely be three columns.

Thanks in advance for any help!

Regards
ShrapNel
 
Posts: 1
Joined: Fri Oct 23, 2009 6:50 pm
Top

Re: Checkboxes in multiple columns

Postby okozaar » Sat Oct 31, 2009 4:40 pm

ShrapNel wrote:Hi Everyone...

I am needing to have a form on my site which will consist of some 150 check boxes - is it possible to get these checkboxes to appear on my website in specifically spaced columns? It will most likely be three columns.

Thanks in advance for any help!

Regards


Hi,

I've got the same problem. I need two or three columns.
if you got an answer please tell me..

thanks

okozaar
okozaar
 
Posts: 4
Joined: Fri Oct 30, 2009 4:32 pm
Top

Re: Checkboxes in multiple columns

Postby rasmark » Mon Nov 02, 2009 6:16 pm

Hello,

I would like to know how to do this also please.
Inline fieldsets or multi column layout.

Thanks.
rasmark
 
Posts: 1
Joined: Mon Nov 02, 2009 6:04 pm
Top

Re: Checkboxes in multiple columns

Postby Samaroo » Mon Dec 07, 2009 9:32 pm

You can do this using CSS. A better solution would be for it to be a part of ckForms.

Here's my CSS to display the checkboxes in two columns:

Code: Select all
.formW {
        width: 65em;
}

.cbox_col1_label {
        position:relative;
        left:19em;
        top:-2em;
        width:30%;
        height:1em;
}

.cbox_col1_field {
        position:relative;
        top:-2em;
        left:-3em;
}

.cbox_col2_label {
        position:relative;
        top: -4em;
        left:40em;
        width:30%;
}

.cbox_col2_field {
        position:relative;
        top: -4em;
        left:18em;
}


I'll walk you through the code, but you'll need to be familiar with CSS to understand this. I'm not a CSS expert but I understand most of the basics. Try to visualise the form is a table with four columns to help with your understanding.

- .formW sets the width of the form on the screen or the width of the "table".
- .cbox_col1_label positions the label for the first checkbox in the second column of the form and sets the width of that column.
- .cbox_col1_field positions the first checkbox in the first column of the form.
- .cbox_col2_label positions the label for the second checkbox in the fourth column of the form and sets the width of that column.
- .cbox_col2_field positions the second checkbox in the third column of the form.

You have to know which of the checkboxes you want in the different columns so you can set the CSS class when creating the field.

You will have to modify the numbers to get what you want to suit your form. If you want three columns add .cbox_col3_label and .cbox_col3_field and tweak the numbers as necessary.

I am not a CSS expert so if someone can make this more efficient then please post the better code.

Also, pedrino perhaps you can incorporate this into ckForms??? :D
Samaroo
 
Posts: 39
Joined: Thu Sep 03, 2009 2:28 pm
Top

Re: Checkboxes in multiple columns

Postby okozaar » Wed Jan 06, 2010 10:28 pm

Thank Samaroo

It's help me to improve my understanding of CSS.... (i' m a newbie too)
but it seems that In this way, I could only have two column for 2 different checkbox.

Maybe i've made a mistake. if this is please help me. But it's looks like CKForm allow only to assign a pair of (field/label) class by field. it will be nice if we could configure it in the details of (value/label) class.....

Because I need to have two or more columns for different pair (value/label) in the same checkbox ?

.....
okozaar
 
Posts: 4
Joined: Fri Oct 30, 2009 4:32 pm
Top

Re: Checkboxes in multiple columns

Postby onglai » Mon Jun 21, 2010 8:02 am

Hi Samaroo,

Thank you for the solution but, where to add this CSS in CKForm?

Thanks again
onglai
 
Posts: 3
Joined: Mon Jun 21, 2010 7:09 am
Top


Return to CKForms 1.3.x Support forum

Who is online

Users browsing this forum: No registered users and 1 guest

cron