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

Jaypan’s picture

Not enough code here to diagnose the problem.

johntang’s picture

Just an idea, please dont care about it. Can you please suggest me how I do?

Jaypan’s picture

No idea - not enough code to say.