4

How to get simple value from AHAH not form element?

http://drupal.org

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

Read »
Created by Dplanet 1 year 11 weeks ago
Category: Modules   Tags:

PSD to Drupal Theme

Drupal Development

Module Development

Get an Estimate

Best published scoops - Modules

Tags for How to get simple value from AHAH not form element?

Recent comments