Set URL on a tab

Discussions about Forms Designer for SharePoint 2013 / 2016 and Office 365.
Locked
Oz.Ab
Posts: 39
Joined: Mon Oct 09, 2017

21 Jun 2018

Hi guys.

I have an edit form with tabs.

I want the last tab (tab number 5) to have the title "...see more" and when the user clicks that tab another edit form will open in a dialog.

Can I do this?

Regards :)

User avatar
Nikita Kurguzov
Posts: 889
Joined: Mon Jul 03, 2017

21 Jun 2018

Dear Oz,
Not sure what form you want to open, so I can't help with the actual URL, but you can use JavaScript to modify a tab that way. Just add an extra tab and use it for these purposes:

Code: Select all

//url to open
var url = 'https://google.com';

//keep the current tab checked:
var currenttab = $('#fd_tabcontrol-0 li[aria-selected="true"] a');
//keep track of the current tab:
$('#fd_tabcontrol-0 li:not([aria-controls="fd_tabcontrol-0-tab-4"])').click(function(){
    currenttab = $('#fd_tabcontrol-0 li[aria-selected="true"] a');
});

//fd_tabcontrol-0 - number of the tab control on the form and tab-4 - number of the tab to click
$('li[aria-controls="fd_tabcontrol-0-tab-4"]').click(function(e){ 
    //click on the current tab to prevent the redirect one from opening
    currenttab.click();
    window.open(url, '_blank', "height=400,width=600");
});
Cheers

Oz.Ab
Posts: 39
Joined: Mon Oct 09, 2017

22 Jun 2018

Thank you Nikita you're a wizard ;)

Locked
  • Information
  • Who is online

    Users browsing this forum: No registered users and 19 guests