Tabs in Dynamic Forms (Remembering last tab)

Forums General discussion Tabs in Dynamic Forms (Remembering last tab)

Viewing 4 reply threads
  • Author
    • #11458
      Naomi R Mena

      With the tabs in Dynamic forms, is there a way to remember which tab was chosen last when entering a new item. Ex: Card, Home Loans, Deposits, when I click on new item I enter it from the Deposits tab. After I save the item, I created a loop to come back to the dialog box so that a new item can be created. However, the tab automatically defaults back to “Card” instead of remembering I was on the “Deposits” tab. Any suggestions? Thanks!

    • #11526
      Alexander Bautz

      The “Use cookie to remember selected tab” functionality in the Misc tab doesn’t currently apply to NewForm, but you can set your redirect url with the paramenter “sTab=[tabIndex]” – like this:


      The current selected tab can be obtained from this variable:

      Hope this helps,

    • #11666
      Naomi R Mena

      Hi Alex,

      Thank you for response. Based on your suggestions we used the below JS code to input within dynamic forms. However, it still goes back to the first “Card” tab and does not stay on the tab we are currently using.

      Any suggestions?

      function PreSaveAction(){
      var URL = location.pathname.replace(‘NewForm.aspx’,’NewForm.aspx’);
      var myTab =;
      URL += “?sTab=” + myTab + “&IsDlg=1”;
      return true;

    • #11689


      I was trying to help Naomi out and what she didn’t include in her last comment is that on save of a new item in full view the tab is remembered. When in dialog it is not. We looked at the properties of the new dialog after save and the sTab parameter was not passed as it should be. We tried to update the code to put the sTab parameter in front of the IsDLG parameter and that broke it completely and after save the user is taken to the default view instead of a new dialog. Hope these details help.

    • #11716
      Alexander Bautz

      Using the IsDlg=1 attribute will not actually redirect you to a new dialog – it is only a keyword for hiding all other things than the form when using a dialog. You can test this by modifying your URL to include this attribute in a non-dialog page.

      In case you want to use a “&” in an URL query string like this, you must escape it to “%26”.

      Regarding the sTab attribute in the URL – you might need to escape the “?” in the sTab attribute like this:



Viewing 4 reply threads
  • You must be logged in to reply to this topic.