ahah forms

Events happening in the community are now at Drupal community events on www.drupal.org.
cgireeshs's picture

Hi,

I am using ahah for my module developement,I have used ahah functionality to load a form when changing the drop down values.I have written call back function for that and i have registered callback menu.Again i have used ahah for the radio button which is in the form that is generated by ahah callback.But I failed to call ahah in the newly generated form elements.Can any one please help me to do this?

Gireesh

Comments

Try the Drupal.org help

jthorson's picture

Try the Drupal.org help forums, the #drupal-support channel on irc, or drupal.stackexchange.com.

Not only is randomly spamming your question to unrelated g.d.o groups strongly discouraged ... no-one can help solve your issue with the little bit of generic information that you have provided us in your post. (NOTE: That is NOT an invitation to respond here with more information ... I'm simply advising you that you will need to provide some additional details, and probably some code, before someone will be able to help you in the proper channels as listed above.)

code example

cgireeshs's picture

$form['jqquiz_option_form']['question_type_id'] = array(
'#type' => 'select',
'#title' => t('Question Category'),
'#options' => array('' => 'Please select...') + jqquiz_categorydropdown_form(),
'#default_value' => $selected_category,
'#ahah' => array(
'path' => 'jqquiz/ahah/js/0',
'wrapper' => 'option-wrapper',
'method' => 'replace',
'event' => 'change',
),
);

$form['jqquiz_option_form']['correct_answer'] = array(
    '#type'=>'hidden',
        '#prefix' => '<div id="option-wrapper">',
    '#suffix' => '</div>',
    );

in this wrapper one form with radio button is generatiing,I want to use ahah callback within generated ahah form

$form_choice['fieldset']['answer_type'] = array(
'#type' => 'radios',
'#id'=>'answertype',
'#title' => t('Answering Type'),
'#options' => array(t('Multiple Answers'), t('Single Answer')),
'#values' => array( 0 => 'No', 1 => 'Yes'),
'#default_value'=>variable_get('answer_type',1),
'#attributes' => array('onclick' =>'javascript:toggle_multiple(this.value);'),
'#ahah' => array(
'event'=>'click',
'path'=>'multichoice/ahah/js/0',
'wrapper'=>'answer-wrapper',
'method'=>'replace',
),
);

Can you look at this and please help me to solve this

What part of NOTE: That is

jthorson's picture

What part of NOTE: That is NOT an invitation to respond here with more information was unclear?