Hello!

I would like to ask whether is possible to have two select boxes and the second to filters its values depending on the first selection with ajax.Is there somewhere i can go and hack the form or smth? Thank you in advance

Comments

fgm’s picture

Category: task » support
Status: Active » Postponed (maintainer needs more info)

Not sure where you want that. Is is on the Ad edit form ? And what do you want to select in these boxes ? The Ad category ?

If that is the case, you might be able to achieve what you're looking for using Hierarchical Select and changing the term selection widget to the Hierarchical Select one, no hack needed.

If that answers your need, please confirm by setting the issue to Fixed and giving a few more details, as it could interest others. Otherwise please provide more details about what you are trying to achieve.

m_dimitris’s picture

Sorry that I wasn't very clear.
In my case I have two entities: State and city. Depending of the selection of the state in the first select box I would like the cities which belong to the current state to appear in the second select box. So I would like something like this http://wimleers.com/demo/hierarchical-select/menu but inside the form that the user uses in order to post a classified ad.
I have already created in taxonomy the states as parent elements and cities as children and I have the hirechical select installed already. But I feel I am too far from finding the way since I am relatively new to drupal.

Thanks for your reply,

m_dimitris’s picture

Status: Postponed (maintainer needs more info) » Closed (fixed)

thank u for ur help.it showed me the way

fgm’s picture

Status: Closed (fixed) » Fixed

Thanks for confirming you were able to solve your issue.

As a side note, when closing an issue on drupal.org, you should never set it to "Closed (fixed)" yourself unless it was created in error, but set it to "fixed". When using the "closed (fixed)" status, the issue is no longer listed and only people who commented on it will be able to see it (more or less). Setting it to "fixed" marks it as fixed, but leaves it visible, so other people who encounter the same problem will see it until the closing bot sets it to "closed (fixed)" two weeks later.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.