Hey Guys,
New to Drupal development, getting a hang of it slowly. I am trying to use Javascript in my Forms for my website and make form elements respond to user changes and appear dynamically. It is basically a multi-step form that i want to make in one page. I have gone through a few of the tutorials on the site and decided on trying AHAH forms . However I have a question for anyone who has used it (and possibly more to follow)?
How do you get the params array from the menu callback/function after the change has happened? For example I am trying to get the SelectedIndex value of a select dropdown once its is selected into a callback. The callback will use this index as a key to get some values in the database that will be used to return another select dropdown with those values as options. I actually need to do this a few times. Something similar to a Country -> State -> City that is popular.
Comments
I know this post is old, But
I know this post is old,
But im trying to do sort of the same thing but cant find the info anywhere (D6)
I have successfully attached the ahah event and it executes the callback function, but how do you pass an argument (the selected value of the element triggering ahah) to the callback function
thanks.
Not sure if this is the
Not sure if this is the right way, but I use $_POST['your_form_field'] in the callback function for that.