Option to not place vocabularies within fieldsets

highvoltage - May 2, 2009 - 19:38
Project:Taxonomy Super Select
Version:6.x-1.0
Component:Miscellaneous
Category:support request
Priority:normal
Assigned:Unassigned
Status:active
Description

Of the two vocabularies on my node form, one of them displayed as checkboxes using taxonomy super select, the other just uses the default dropdown box. The problem with the checkboxes, is that taxonomy super select nests the vocabulary within a general collapsable fieldset and then within it's own collapsable fieldset.

It lacks the typical field label and ruins the continuity of the form. It's an eye sore and it's getting in the way of theming my forms to be as simple and small as possible. There's no reason for taxonomy super select to display vocabularies in their own seperate fieldsets.

Is there something I can do about this now?

#1

martysteer - May 7, 2009 - 10:02

I agree, there should be some configurable display options for this module.

#2

Onopoc - July 10, 2009 - 18:40

+1 for this new feature

#3

Dark-Light - July 30, 2009 - 23:23

Any advances on this feature?

#4

talino - August 16, 2009 - 07:30

I've tried a zillion ways to modify that behaviour through form_alter, either through a custom module or template.php, but weirdly enough the fieldset doesn't show up in the array when I do print_r($form). Has anyone managed to find the correct way to modify the form? All I need is to set #collapsed & #collapsible to FALSE. If, in the module itself, I change the TRUE values in lines 150 & 160 to FALSE, it works like I want it to, but I can't find a way to do this without modifying the module.

#5

capellic - September 4, 2009 - 03:21

The right way to do this would be to write a patch that creates a configuration screen so that we could set the #collapsed and the #collapsible values at lines 150 and line 160 just like @talino says. Otherwise, just edit the module. I like to alter the .info file of modules I modify to indicate in the description var that the module has been changed from the official release.

#6

talino - September 4, 2009 - 05:49

This finally worked for me in my custom module, but only after I changed the module's weight in the system table to higher than TSS (easy to do even for a newbie like myself). Note that the following checks for two custom content types, article and document, and only changes those. You can drop the switch statement altogether if you want to alter every form.

<?php
function YOURMODULE_form_alter(&$form, $form_state, $form_id) {
  switch (
$form_id) { // In case we need to alter other forms later
   
case ('article_node_form' || 'document_node_form'): // We only need to alter TSS on these forms
     
$form['taxonomy'][1]['#collapsed'] = FALSE; // [1] is the vid of the vocabulary we want
     
$form['taxonomy'][1]['#collapsible'] = FALSE;
      break;
  }
}
?>

Don't modify modules directly :)

#7

capellic - September 4, 2009 - 11:43

Here's the CSS that I applied to my theme's CSS file after I had removed collapsed and collapsible. While applying this CSS snippet won't make your TSS output look exactly like the attached screenshot, it will take care of the layout.

/** Taxonony Super Select **/
.taxonomy-super-select-checkboxes
{
padding: 0;
}

.taxonomy-super-select-checkboxes fieldset
{
border: none;
padding: 0;
margin: 0;
}

.taxonomy-super-select-checkboxes fieldset div
{
padding-left: 10px;
}

.taxonomy-super-select-checkboxes fieldset legend
{
font-size: 11px;
padding-bottom: 0.5em;
}

.taxonomy-super-select-checkboxes fieldset fieldset
{
padding-left: 16px;
}

.taxonomy-super-select-radios
{
margin-top: 2px;
padding: 0;
}

.taxonomy-super-select-checkboxes fieldset fieldset legend
{
font-size: 11px;
padding-bottom: 0;
}
/** End Taxonony Super Select **/

AttachmentSize
Picture 24.png 10.77 KB

#8

muhleder - September 14, 2009 - 13:03

Would love to see this too, subscribing.

#9

yrre7 - October 30, 2009 - 06:22

Subscribe

#10

doublejosh - November 17, 2009 - 21:48

subscribed

 
 

Drupal is a registered trademark of Dries Buytaert.