Hi,
I have customize user registration page. For this I am using Node profile module. I got a select box for Country & second select box for state.

Now i wanna to use Ajax with both of this fields. How can i use this? When user select USA, then USA state should be displayed, if any other country select then state should be disable. How can i achieve this.

Best,
Kamlesh

Comments

kamleshpatidar’s picture

i forgot to add code
i add in template.php

function phptemplate_user_register($form) {
  return _phptemplate_callback('user-register', array('form' => $form));
}

user-register.tpl.php

echo drupal_render($form['profile_personal']['form']['#form']['field_country']);
echo drupal_render($form['profile_personal']['form']['#form']['field_state']);
yched’s picture

Status: Active » Fixed

CCK does not provide this functionality out of the box.
You might want to check http://drupal.org/project/hierarchical_select (works with http://drupal.org/project/content_taxonomy)

Status: Fixed » Closed (fixed)

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