Not applicable

TabChoice to open a Link/Direct to a List View

Jump to solution

Hello,

This is a 2 parts question: PART 1: I've built a form with panels that are set to open based on the selection I make from a TabChoice.  One of the options is "Form Change Request", and I would like to use this choice to open a link, whatever it may be.

PART 2: I would like to link the TabChoice, "Report Issues" to a view that I have created (in the same list library as the form's). 

Are these two functions possible?  I understand it may require javascripts. 

0 Kudos
Reply
8 Replies
andrewg
Scout

Re: TabChoice to open a Link/Direct to a List View

Jump to solution

That seems to be possible, by adding a click event on the choice to check the value. When the right one is selected perform a window.location redirect. 

Reply
Not applicable

Re: TabChoice to open a Link/Direct to a List View

Jump to solution

Thanks for the response, Andrew.  I've started looking at some posts that mentioned something similar to what you've stated.  I need to work on a script.  If you have suggestions, please do share.  Thanks!

Reply
andrewg
Scout

Re: TabChoice to open a Link/Direct to a List View

Jump to solution

Understand this isn't tested, but I would imagine the script would go something like this. Let me know if it helps or works.

NWF.FormFiller.Events.RegisterAfterReady(function () { checkTabs(); });  
function checkTabs() {
     NWF$('#' + TabChoice).find('input').on('change', function () {
          if (this.value == 'Form Change Request')
          {
               window.location = 'http://site.com/list';
          } else if (this.value == 'Report Issues')
          {
               window.location = 'http://site.com/list';
          }
     });
}
Reply
andrewg
Scout

Re: TabChoice to open a Link/Direct to a List View

Jump to solution

TabChoice would be the JavaScript client id for the choice control

Reply
Not applicable

Re: TabChoice to open a Link/Direct to a List View

Jump to solution

You're awesome, Andrew.  that did it.  I forgot to change the TabChoice to the variable that I had declared but once I made that change it worked.  Your code is much simpler than the one I was tweaking with.  Thank you again!

Reply
andrewg
Scout

Re: TabChoice to open a Link/Direct to a List View

Jump to solution

That's great! Glad to help!

Reply
Not applicable

Re: TabChoice to open a Link/Direct to a List View

Jump to solution

Yes, that was a great help!  I'm going to modify the code to incorporate the other tabchoice options to function in the same way. 

0 Kudos
Reply
andrewg
Scout

Re: TabChoice to open a Link/Direct to a List View

Jump to solution

If you don't mind when you are done, go ahead and post another screen shot and some code. Your scenario will greatly help out others with the same issue and scenario.

Reply