By Santiago-1 on
Hi,
I am just struggling with my first module,
I created a formulaire for the end user consisting of 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)
But how could I get PHP code(in my module), after the submit, the current term id of the current selection of the hierarchical select?
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 ...
Comments
I posted this 3 days ago ...
Has anybody out there done this already?
Thanks,...
http://drupal.org/node/748178
http://drupal.org/node/748178
and don't double post
thijsvdanker wrote - 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
PS: Sorry thijsvdanker, but I posted this already some days before and therefore I tried luck (for the first time) at module development.
_
Double posting just clogs up the database, fragments support, and makes things harder to find... feel free to bump the same post though.