Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By johntang on
Hello,
I have the Views with the views_exposed_form, I have 2 dropdowns for filtering, For now I want to make a depends between the dropdown, for example: IF Dropdown 1 selected = 1, then hidden Dropdown 2 (field_xe_mau_tid2), otherwise show this.
Note that this two fields (dropdown) is already existed, I want to make visible then filter from the Views only.
unset($form['field_xe_mau_tid2']);
$form['field_xe_mau_tid']['#ajax'] = array(
// When 'event' occurs, Drupal will perform an ajax request in the
// background. Usually the default value is sufficient (eg. change for
// select elements), but valid values include any jQuery event,
// most notably 'mousedown', 'blur', and 'submit'.
//'event' => 'submit',
'callback' => 'field_xe_mau_callback',
);
field_xe_mau_callback is callback function, but I tried dpm the variable but it's showing "Invalid form POST data" from the Log report.
Regards,
John
Comments
Not enough code here to
Not enough code here to diagnose the problem.
Just an idea, please dont
Just an idea, please dont care about it. Can you please suggest me how I do?
No idea - not enough code to
No idea - not enough code to say.