Hi all,
As described in this page : http://groups.drupal.org/node/3932, I'm using the active select module in order to create dynamic forms.
I want to enable or disable form elements on select events.
the php array I return in my active select callback function is as follows:
<?php
$my_php_array = array(
'bar-2' => array(
'options' => array(
'opt-val-3' => array(
'value' => 'opt-text-3',
'selected' => TRUE
)
),
'multiple' => FALSE,
'disabled' => FALSE
),
'bar-3' => array(
'options' => array(
'' => array(
'value' => 'Please choose...',
'selected' => FALSE
),
'opt-val-1' => array(
'value' => 'opt-text-1'
),
'opt-val-2' => array(
'value' => 'opt-text-2',
'selected' => FALSE
),
'opt-val-3' => array(
'value' => 'opt-text-3'
),
'opt-val-4' => array(
'value' => 'opt-text-4'
)
),
'multiple' => FALSE,
'disabled' => TRUE
),
);
...
print drupal_to_js($my_php_array);
?>
Everything works excepted the #disabled property.