cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Adding link to a column in Nintex form when in Display mode using Jquery

I am trying to add a hyperlink to a column value in Nintex form (dispform). On document ready, I am setting the value properly. But, it seems it is getting set before the form is loaded completely. After my script is executed, on the column value, I am seeing 'Loading..' for a flash and the default value is getting displayed. How can I set the value of the column only after the form renders completely?

Here is my code:

 

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

//Getting the Column value through Site Column's display name and modifying the value in the adjust label where the actual value is displayed

     var lbl = NWF$('label').filter(function () {
         return NWF$(this).text() === "Site Column1";
     }).closest('.nf-form-label.nf-section.nf-filler-control.nf-filler-highlightonvalidationerror').next().children().children().children().children();
     var varLblText = lbl.text();
     lbl.Text = '';
     lbl.append("<span><a href='" + varActlink + "'>" + varLblText + "</a></span>");

}

Labels: (2)
0 Kudos
Reply
2 Replies
Workflow Hero

Re: Adding link to a column in Nintex form when in Display mode using Jquery

Hi,

Instead of document.ready you could try the following approach, this will run the code once Nintex Forms has been initialised.

NWF.FormFiller.Events.RegisterAfterReady(function () {

//Getting the Column value through Site Column's display name and modifying the value in the adjust label where the actual value is displayed

     var lbl = NWF$('label').filter(function () {
         return NWF$(this).text() === "Site Column1";
     }).closest('.nf-form-label.nf-section.nf-filler-control.nf-filler-highlightonvalidationerror').next().children().children().children().children();
     var varLblText = lbl.text();
     lbl.Text = '';
     lbl.append("<span><a href='" + varActlink + "'>" + varLblText + "</a></span>");

})

Jan

0 Kudos
Accept as Solution Reply
Not applicable

Re: Adding link to a column in Nintex form when in Display mode using Jquery

Thanks Jan Eyres.

Still I am getting 'Loading...' while accessing the control using 'NWF.FormFiller.Events.RegisterAfterReady'. Is there any other event that runs after the control is completely loaded ?

Note: The control I am trying to access a calculated control

-Pradeep Nulu

0 Kudos
Accept as Solution Reply