Posted by bwright on June 24, 2009 at 2:38am
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.
| Attachment | Size |
|---|---|
| columns.jpg | 16.29 KB |
Comments
http://drupal.org/node/41936
http://drupal.org/node/41936
Skip the post and go straight to the fist comment.
BrandTim
thanks for the link. This
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
...and without adding any divs or other markup:
.form-checkboxes .form-item {
float:left;
width:50%;
}
Use css as bwright suggested
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.
--Willy
Life worth it to live. No matter what you're going through. Only your weakness can overcome your strenght.
--Sites
http://www.telecomaroc.com/
http://www.squaresystems.co.ma/
There is a module for that :)
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.
http://certifiedtorock.com/u/11944
Love it!
Thanks much mattyoung!
Thanks!
Thanks mattyoung