I have 2 fields, state and city. I would like to change the city field when I select the state field. I tried to use "hs_nodereference", but this module shows the state and city fields as follows.

statename: statelist
cityname: statelist  citylist

I want them to be shown as follows.

statename: statelist
cityname:  citylist

Does anyone know a solution for this?

2 Answers 2


Make a vocabulary with states at zero level and cities at deepest level for each state. Then install hierarchical_select module.

Enjoy :)

  • i used hs_nodereference but it was not not good for me. i tested hierarchical_select but i couldnt use it in taxonomy. is there any tutorial or video? thank u
    – user780
    Mar 28, 2011 at 4:25
  • look at mefeedia.com/watch/34006460
    – dobeerman
    Mar 28, 2011 at 4:48

I think you need to create a view with the display that'd you like (i.e. a view that is formatted so just citylist appears) then reference the view from the custom field. also it's possible that the view may need to have the same name as your reference field

to reference a view, under content types > fields > select the field you want > configure

I'm actually using "Node reference views" module so maybe this advice is for that

  • thank you but problem is in CCK not view. statename(label) : statelist (drop down to select) cityname(label): citylist (drop down to select)
    – a.v
    Mar 26, 2011 at 11:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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