Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I first searched in the issue queue for similar use case, but I could not. Please correct me if I am wrong.
What I want is, I want to display only few terms from a vocabulary with lots of terms. I tried with hook_form_alter, but that did not work.
Regards.
Comments
Comment #1
joshi.rohit100On what criteria you want to do this ? I mean - drupal dont know whether you like x1 or y1. What you can do, you can create a view with limit, order by, condition (if there is any) to list terms.
Comment #2
beautifulmindHello Rohit,
If you do not understand the question, you do not have to respond.
Regards.
Comment #3
joshi.rohit100Well you should be humble if someone is trying to answer you question and same goes for you -
If you don't know what your problem is and also don't know how to explain it, you don't need to post.
Regards
Comment #4
jdanthinne CreditAttribution: jdanthinne as a volunteer and at Synthèse commentedWow. Keep calm, guys…
I think I understand the problem well. Strange that hook_form_alter is not working. Which $form_id are you trying to alter?
Now that I think about it, Custom Search module has a module weight of 100, so be sure that the module you're using to alter it must be higher.
Comment #5
jdanthinne CreditAttribution: jdanthinne as a volunteer and at Synthèse commentedI've just check, and the Custom Search Taxonomy submodule itself has a weight of 101… So yours should be at least 102.
Comment #6
beautifulmindRohit,
You are ridiculing yourself. I did not ask the question addressing you specifically. I know what my issue is and what I have asked.
Thanks for not replying further.
jdanthinne,
I am able to see everything with form alter but the fields on the form. Its (Read: Custom search block module) adding some post processing to the form and displays a div with terms name in ul li. The main select box stays hidden.
So, irrespective of the module weight, that's not going be caught with hook_form_alter.
I will keep you posted about the solution I find. So every one else can use the same in future.
Regards.
Comment #7
joshi.rohit100It seems like you don't need anybody's help because when you ask question in opensource forum, you don't address anyone. Instead if someone tries to help you, you should appriciate.
Seems like you have mis-conception (If you check IS and your last comment).
Anyway... unsubscribed.
Thanks
Comment #8
beautifulmindGlad to learn that.