cancel
Showing results for 
Search instead for 
Did you mean: 
jhui
Nintex Newbie

Is there a way to force links in Forms to open in a new tab?

Jump to solution

Is it possible to force links to open in a new tab from a Form?

I have a workflow that creates a subfolder in a Doc Library and then writes the link back into the form. It'd be nice if when the user views the form, they click the link and it opens into a new tab.

Tags (1)
0 Kudos
Reply
6 Replies
Automation Master
Automation Master

Re: Is there a way to force links in Forms to open in a new tab?

Jump to solution

Hi Jonathan,

How do you write the link?

If you can add target="_blank" in your a href tag, it should solve you issue.

<a target="_blank" href="http://your_url_here.html">Link</a>

Regards,

Christophe

Reply
jhui
Nintex Newbie

Re: Is there a way to force links in Forms to open in a new tab?

Jump to solution

Hi Christophe,

I use the Set Field in Current Item > Encoded Absolute URL

0 Kudos
Reply
Automation Master
Automation Master

Re: Is there a way to force links in Forms to open in a new tab?

Jump to solution

Hi Jonathan,

You need a Nintex Form for your Doc Library

For your DocFolder field Control Settings, under Formatting, for CSS class, append  cssfldDocFolder.

It should appear like this: nf-form-input cssfldDocFolder

Then can create a Rich Text Control in the Form.

In this control, under Formatting, in CSS class, fill in MyRichTextControlClass

In Form Setting, under Custom Javascript

NWF$(document).ready(function () {

    var strDocFolder=NWF$('.cssfldDocFolder').text();

    NWF$('.MyRichTextControlClass').html('<a target=\'_blank\' href=\''+strDocFolder+'\'>'+strDocFolder+'</a>');

});

Please note that this will work in View mode only, this is why we get the value of DocFolder using CSS instead of Javascript value: .val()

Regards,

Christophe

View solution in original post

Reply
jhui
Nintex Newbie

Re: Is there a way to force links in Forms to open in a new tab?

Jump to solution

Thanks! I'll give this a shot.

Reply
jhui
Nintex Newbie

Re: Is there a way to force links in Forms to open in a new tab?

Jump to solution

Hey Christophe,

When I added the CSS class, MyRichTextControlClass and Custom Javascript, it made everything blank on the form upon publishing.

0 Kudos
Reply
Automation Master
Automation Master

Re: Is there a way to force links in Forms to open in a new tab?

Jump to solution

Hi Jonathan,

This means that your Javascript code is not well formed.

Please follow this link to make sure it is right

https://community.nintex.com/community/dev-talk/blog/2015/06/23/video-writing-custom-javascript-in-n...

Regards,

Christophe

Reply