0

I have a website that is about automobiles, I want when a user choose a brand drupal shows some of its models:

This image show an example:

for example I want when a user selected BMW drupal shows BMW's models in other select tag dynamic. and for example selected Lamborghini drupal shows Lamborghini's models.

select a car model

I mean a tree stystem

2

I would recommend you to use any one of following modules.

Hierarchical Select

This module defines the "hierarchical_select" form element, which is a greatly enhanced way for letting the user select items in a hierarchy.

Simple hierarchical select

Simple hierarchical select defines a new form widget for taxonomy fields to select a term by "browsing" through the vocabularies hierarchy.

Taxonomy Term Reference Tree Widget

This module provides an expandable tree widget for the Taxonomy Term Reference field in Drupal 7. This widget is intended to serve as a replacement for Drupal's core Taxonomy Term Reference widget, which is a flat list of radio buttons or checkboxes and not necessarily fit for medium to large taxonomy trees.

  • what are these? – Mohammad Kermani Jun 26 '14 at 8:21
  • These are contributed modules that gives you feature of such type of problem, you are facing. Gone through once from any of links, get brief idea of each. Your problem looks like the same that these modules can easily solve. – Pushpinder Rana Jun 26 '14 at 8:27
1

You can check the conditionnal fields module which is based on the States API if you want to do this hardcoded.

An other way to do this is by using hierarchical taxonomy and a module like Hierarchical Select even though you might be limited.

  • I want editors do it now super user or administrator – Mohammad Kermani Jun 26 '14 at 8:25
  • Once the module or your taxonomy is configured then the editors will be able to do this. – pbonnefoi Jun 26 '14 at 8:27
  • I should test it – Mohammad Kermani Jun 26 '14 at 8:29

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.