How to render taxonomy checkboxes in CCK form as columns?

Hello. I have a CCK content type with several fields that are long checkbox lists of taxonomy terms. I would like to be able to render the checkboxes in columns so that filling out the node form will not require so much scrolling (and to just make it look a little nicer). I'll attach a screengrab of what I'm after. I've been searching around for a couple of days but haven't found a good way of doing this. Any ideas on how to accomplish this much appreciated.

AttachmentSize
columns.jpg16.29 KB
Login to post comments

http://drupal.org/node/41936

BrandTim - Wed, 2009-06-24 02:55

http://drupal.org/node/41936

Skip the post and go straight to the fist comment.

BrandTim


thanks for the link. This

bwright - Wed, 2009-06-24 17:53

thanks for the link. This looks promising but I'm a little confused--Nancy says she 'adds a div (using #prefix and #suffix)' to the form output so that she can style it using css. I'm not sure how to add this markup to the rendered form. Do I use a preprocess function in my theme's template.php? Or is there some other method?


I just figured out how to do this with two lines of CSS

bwright - Wed, 2009-06-24 21:59

...and without adding any divs or other markup:

.form-checkboxes .form-item {
float:left;
width:50%;
}


Use css as bwright suggested

wilmar81's picture
wilmar81 - Thu, 2009-06-25 09:02

I would suggest to use a fieldgroup and add a css later. But the solution bwright provided is easier, lighter and better. you can customize your checkboxes better if you look in the html code. Each checkbox has an id, which allows you to add deeper customization.


There is a module for that :)

mattyoung's picture
mattyoung - Sat, 2009-07-04 07:45

I created a module that does multi-column checkboxes/radios: http://drupal.org/project/multicolumncheckboxesradios

I am lookng for ways make CCK checkboxes/radios widgets able to incorporate this. If anyone knows how to do this, please let me know.