> dave sent a message using the contact form at http://wimleers.com/contact.
>
> This is a quick question for the hierarchical_select module
>
> Which line do I change to make the option say "Choose One:" or
>
>
> If I add a label to the root I just get :
>
> Choose One
>
> taxonomy term 1
> taxonomy term 2
> etc.
>
> Let me know. I have this module working. It's totally the best, but with the ability to change the this could provide a better user experience.
>
>
>
Comments
Comment #1
wim leersEnable "level labels" and then you'll be able to set that.
It's the first fieldset of the config UI, as can be seen here: http://wimleers.com/demo/hierarchical-select/config-ui.
If that's not exactly what you want (that's not entirely clear to me), you'll have to override
theme_hierarchical_select_special_option().Comment #2
benone commentedyes, but for root level still exist as first option under the label I created. How to remove it ?
Comment #3
benone commentedthe " < none > " , I mean :)
Comment #4
wim leersAs long as the HS is optional, you can't remove it. But you can override the text through that same theme override ;) (Ugly, but works.)
Comment #5
benone commentedI made fileld Required and added the Label , and < none > still is over there.
What you mean writing "As long as the HS is optional, you can't remove it." ?
Comment #7
beumont commentedI want to remove the "" how to do that?
Comment #8
beumont commentedComment #9
sifaan commentedHi!
I would also like to know how to not have the displaying
I have set the field as required (and even tried setting the taxonomy I am using as required) but still HS gives me a option.
I have even tried setting a particular term as the default value.
(Of course, I cannot submit the form with selected, the validation rejects it; but I would prefer to not have this option visible at all).
Thanks
/Sifaan
Comment #10
mark. commentedYeah, this bug was a real pain for me to figure out how to fix. My forum vocabulary (programmatically set to required) had the option for no reason. A fix is to go into hierarchical_select.module, go to line 1774 and change this:
to this:
Comment #11
wim leersThat doesn't solve the problem at all. That just removes the "none" option by hacking the code. It should not be removed.
Comment #12
mark. commentedIn light of multiple users experiencing otherwise, do you stand by what you wrote in #4: "As long as the HS is optional, you can't remove it."?
Since the thread was closed immediately after others explained that is not the case, there's no definitive answer.
Comment #13
inforeto commented#4 says to use the theme override.
Without an override the module automatically inserts the <'none'>:
Thus on your theme you can have a function that overrides it:
yourthemename_hierarchical_select_special_option($option)
On it you can add a line like:
Naturally only return your text when $option is 'none', because the function is also used for other strings.
Overrides are the drupal way to allow custom changes without altering the module's code or data.
Comment #14
wim leersThanks, inforeto :)
Comment #15
drupalnesia commented@Wim Leers: CCK by default not works like that. If we set a field as "Required" than you should not show "< none >" as an option.
Also, if you set HS "Level choice" to "Allow the user to choose a term from any level" then the "< none >" option not available. I found this bug only appear when you set HS "Level choice: Force the user to choose a term from a deepest level".
I'm using HS 6.x-3.6 with Drupal 6.20
Added: when I Choose "< none >" then HS change my selection to "Level label".
Comment #16
wim leersI think you replied to the wrong issue?
Comment #17
wim leersClosing due to lack of response.