By tomas.teicher on
Hi,
I need to get values when user fill the form. I would like to make it with AHAH. I have problem to pass inserted values. For example I have simple textfield "name" and in my ahah callback function I have
<?php
function my_ahah_callback(){
$form = ahah_example_callback_helper(); //function needed to get form - function in ahah example module
return drupal_json($form['name']['#value']);
exit();
}
?>
After some testing I found out that $form['name']['#value'] is null although isset($form['name']['#value']) returns true. when user insert some value into textfield it returns null by ahah.
There are many tutorials on web how to render form element by ahah but there is no one how to get simple element value in callback function.
Am I doing something wrong?
thanks for any advice
Tomas
Comments
I found solution. I don't
I found solution. I don't know whether it is clearest way to get form value, but it works