Hi,
I am just trying to put together my first module, ...
I created a formulaire for the end user consisting of a dinamic graph, a dropdown menu and a submit button ...
In the drop-down menu I display a vocabulary, and I used a hierarchical select widget(hierarchical_select module)
Now, how could I get in my PHP code(in the Submit buttton handler of my module), the current term id of the current selection of the hierarchical select (hierarchical drop down)?
For a simple textbox for example a code like:
$note = form_state['values']['note'];
would put in $note the user's entry of that textbox ..., but this code is not working for the selection of my widget, although I just need something like this for my drop down field ...
Comments
I don't know the hierarchical
I don't know the hierarchical select module, but in general this is what I do:
Install and enable the development module (http://drupal.org/project/devel).
In the submit handler function try
dpm($form_state);Now when you submit the form, you should see the output of devel, displaying the content of form_state.
If you drill down that array you can find the value you're looking for.
Good luck,
Thijs
Thank you Thijs ...
This is the kind of insider advice which really helps a lot ...I will try this and come back soon
Bingo
Voll Treffer!! Thank you again Thijs!
You're welcome!
You're welcome!