Hi, I want to create a drupal view that display as the uploaded image. There are two select list. First select list is static. According to the selected category sub category should by populated. All categories and subcategories are stored as taxonomy term. Any idea would be appeciated.
2 Answers
Your usage of the word "view" and the views tag in your question is misleading, since IMO your question is not about the Views module.
As an alternative to using taxonomy terms, you should give it some thought to rework what you're trying to do using regular fields. By doing so, you can use the Conditional Fields module to achieve your goal. Excerpt from the Conditional Fields project page:
Conditional Fields allows you to manage sets of dependencies between fields. When a field is “dependent”, it will only be available for editing and displayed if the state of the “dependee” field matches the right condition.
When editing a node (or any other entity type that supports fields, like users and categories), the dependent fields are dynamically modified with the States API.
You can, for example, define a custom “Article teaser" field that is shown only if a "Has teaser" checkbox is checked.
So if you have a field labeled (say) Category
with 11 possible values Electronics
, ..., Other
(as in your question), you could combine this with a Subcategory
field labeled (say) Electronics
with 12 possible values Mobile Phones
, ..., Video Games & Consoles
(as shown in your screenprint for subcategory). Then add 10 more similar subcategory fields for Cars & Vehicles
, ..., Other
and you're done.
PS: I'm assuming this question is about D7.
You can take a look at the Taxonomy menu module. Some details about it (from its project page):
Transforms your taxonomy vocabularies into menus with ease!
Also look at this post: