My case is simple: When user switches tabs, I want to dynamically fill empty fields in the tab he entered, calculating them from the tab he went from. Like suggesting city by zip code, or address by company name if I have it in database.
Problem is - I can do it on button click or on field's blur, but I'd prefer it to happen on vertical tab switch. Items with
vertical_tabs type simply does not have
#ajax property. Is there any neat way around it?
#states seemed a solution, but it seems they only support static value set, like:
':input[name="foo"]' => array('value' => 'bar'),