The Category box comes collapsed by default. Is there a way that it can be expanded initially, without the user having to figure out that they should click on it?

Comments

eigentor’s picture

+1 by me.
It's pretty hard to figure out that something is hidden under one little word with a small arrow at its side.

Rob T’s picture

I noticed that in at least one instance, the field set was expanded if I defined that taxonomy as being "Required". So I snooped around...

On line 192-193 of taxoxonomy_super_select.module, the code states:

           // Automatically expand required vocabs or if the parent term is selected
      $collapsed = ($required OR $term->parent_value) ? FALSE : TRUE;

I changed that to:

            // Automatically expand required vocabs or if the parent term is selected
      $collapsed = ($required OR $term->parent_value) ? FALSE : FALSE;

In my brief testing on non-live 5.5 site, all the field sets are expanded even if the vocabulary is not required. If I notice anything hairy, I'll chime back in. I'd love for there to be an option in the admin's "edit vocabulary" screen for this.

Alternatively...

Modifying this line on Line 197 will eliminate the Super Selects field set's collapsibility.
'#collapsible' => TRUE,

to
'#collapsible' => FALSE,

nancydru’s picture

Status: Active » Postponed (maintainer needs more info)

That is correct. If the vocabulary is required, the fieldset would be expanded. If it is not required, it is not. IMO, this is the way it should be. I would be possible to add a setting to override this if enough users really want it.

nancydru’s picture

Status: Postponed (maintainer needs more info) » Closed (fixed)

No further information.

MBroberg’s picture

+1 for the option to decide per form. Some forms need it expanded and some don't.
Depends on how big the form is and how smart the user is. ;)

karljohann’s picture

Is it possible to do this just so the taxonomy itself is not collapsed? That is, all the "root" categories are visible.

mherchel’s picture

+1 on having the option to choose if it is expanded by default

tallsimon’s picture

please add setting, would like to have this option thank you

doublejosh’s picture

+1, so I suppose one of us needs to do it now.

broon’s picture

I've created a short patch to display an extra option on vocabulary edit page to collapse the fieldset by default. Patch is attached. Please review.

Regards,
Paul

EDIT: Patch contains an option to choose whether this new collapse option may still be overridden by required vocabs, see code lines 159ff. in .module file (after applying patch).