#ahah & forms , how js function callback of #ahah can change #disable attribute of other field of the form?
Let me explain better,
Working with forms, we define each field with the $form array
ex: $form['country'] = array (
...
'#disable' => true,
...
'ahah' => array ( 'event' => 'change', 'path' => 'change_other_field_disable_status_js' )
)
$form['zipcode' = array(
...
'#disable' => false,
...
)
after mapping the menu callback, to function 'change_other_field_disable_status_js' I tried everything I know(probably not much :D ) , in this function, to toggle the #disable from false to true of the 'zipcode' field....
The idea is to have dynamic rules for each field, regarding their input.
Please help, I'm really need a solution for this problem.
Comments
Did you see the dojo lesson on AHAH?
I don't know an answer, but just saw this lesson this morning: http://drupaldojo.com/lesson/ahah
hope it helps
Frans Kuipers
LinkedIN: http://nl.linkedin.com/in/franskuipers
Video screencast
Hi franskuipers, did you happen to save that web cast? The drupaldojo.com link to it appears dead :(