1

I have the taxonomy 'Types' with terms A, B and C. I've added a term reference field 'Type' to the users with the 'Types' vocabulary. Now, when people register, they can choose between A, B and C in the 'Type' field, but I'd like them only to be able to choose between A and B.

How can I hide the third option?

4

You can use the Entity reference module to achieve this goal.

  1. Install Entity Reference module.
  2. Create a view of terms, with a display type of Entity Referance, and your filters/conditions
  3. Create a field of Entity Reference type.
  4. In field settings: Choose its target type is Taxonomy Term.
  5. In entity selection mode choose 'Views Filter by an entity referance view'. Choose the view you created above in 'View used to select entities'.
  6. Now save it.
| improve this answer | |
  • 2
    Can you be a little more specific? I suppose you insinuate that I should do some custom coding, but I don't have a clue about how I should start... – Jeroen Feb 16 '14 at 8:09
  • 2
    @Rupesh Thanks for adding the necessary steps and creating a good answer - just for future reference, you can edit the answer to add more details, it's better to do that than put things in the comments where they might be missed – Clive Feb 16 '14 at 13:46
0

With core features, I believe you can't hide certain fields from being selected in the field.

Term Reference Filter By Views is a handy module for this. Install the module, and create a View (taxonomy terms) and add whatever filter you want to use to hide the terms that you don't want to make available (a Term ID exclusion will do). You will need to use a certain Display (read module's doc) in the View.

In the front end, user will be able to autocomplete or select the terms, but the list/pool is generated through the View, so your filters are applied automatically.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.