Can you describe your problem differently? I'm not sure I understand the problem.
If you are trying to return to the same tab(?) last selected by the user?
You could consider using a cookie or localstorage to return to a particular display.
If you are trying to create multiple forms, perhaps you can give and id value to each one
and call the submit for a particular form with: document.getElementById('formID').submit();
Do you have an example site or some code to demonstrate the problem you are having?