Posted by andros92 on
Hi,
I created a new module for managed pre-build list of option components of webform module.
I implemented hook_webform_option_list_info
<?php
function dataoption_ajax_webform_select_options_info() {
$items = array();
$items['clienti'] = array(
'title' => t('Clienti'),
'options callback' => '_getClienti',
);
$items['periferiche'] = array(
'title' => t('Periferiche'),
'options callback' => '_getPerif',
'#prefix' => '<div id="div-perif">',
'#suffix' => '</div>',
//'options argument' => array('arg1' => 'NULL'),
);
return $items;
}
?>I want to add some ajax code to set list value of second option component related on the value of the first option component.
So, whene value changes on 'clienti', the component 'periferiche' must be reloaded with new list value.
Anyone can help me?