My main form has three tabs. If I select one, say tab 3, click on Save, Cancel or Close (X in upper right) I return to the browse. If I select another row in the browse and click Change to edit the record, the form opens on the last selected tab, in this case tab 3.
To remedy this I added some JavaScript to my custom js file:
$(document).ready(function() {
$("[type=button]").on("click", function() {
$("div#tab_updatecoincollection_div").tabs({active: 0, selected: 0, cache: false});
});
})
This works well when I select the Save or Cancel buttons, but does not work when I click Close button (X in upper right of form). I'm not sure what the difference is with the Close button in the upper right. The key is I want the form to always open on tab 1 (in this case tab 0, since tabs are zero based.) Any thoughts on how to get the form to always open on tab 1?
Thanks,
Jeff King