How to remove or disable lookup hyperlinks on nintex forms 2013 ?


Badge +3

I have List Lookup fields in my nintex form. Once the form is completed and submitted, when I view the form it displays with hyperlinks on the Nintex form.

When I click on the hyperlinks it navigates to the Lookup values list.

I want remove or disable the lookup hyperlinks on the nintex form once it is submitted.


10 replies

Userlevel 5
Badge +14

try following:

- add class notActiveURL to a lookup control

- place following piece of code into form settings

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

  NWF$('.notActiveURL').mouseenter(function(){

    if (Is Display Mode && NWF$('.notActiveURL a')){

      NWF$('.notActiveURL a').attr('href',null);

      NWF$('.notActiveURL a').attr('onclick',null);

      NWF$('.notActiveURL a')[0].onclick=null;

      NWF$('.notActiveURL a')[0].click=null;

      NWF$('.notActiveURL a').css('pointer-events','none');

      NWF$('.notActiveURL a').css('cursor','default');

      NWF$('.notActiveURL a').css('text-decoration','none');

    }

  })

})

Badge +3

HI Pascal,

Sorry for the Late reply. Yes, I got the solution for this. Follow the Steps.

Step 1: Create a label for each field where there is a hyperlink.

Step 2: Configure the Label with the same Item Property with respect to the Field which shows the hyperlink.

Step 3: Add Rules to the newly created label on the form . (Edit mode -- Hide)

Step 4: Add Rule to the lookup Field ( Is Display mode -- Hide)

Step 5: Place the label on the lookup field in the form. ( Place the label over the Lookup field, on one another)

If you still have any questions on this method, please let me know.

Userlevel 5
Badge +14

Hi ram Kanteti‌,

were you able to resolve your issue?

if so, could you close the question by selecting correct answer?

#BRGreview

Badge +5

Marian,

I used this and it's working in v2.10.0.0.  The only thing I did different was removed the .mouseenter function and added another css entry.   NWF$('.notActiveURL a').css('color','inherit');

Thanks for sharing,

-JC

Badge +2

Hi Joseph,

Is it possible to post your working code please? Thanks !

Userlevel 5
Badge +14

thanks for sharing ‌.

however, I wonder whether it is reliable then.

if there appears a link that is built after ready event is gone, it will not be disabled.

and lookups are exactly such examples, since they are populated/resolved asynchronously after page is ready.

Badge +5

NWF.FormFiller.Events.RegisterAfterReady(function () {  
    if (Is Display Mode && NWF$('.notActiveURL a')){ 
      NWF$('.notActiveURL a').attr('href',null); 
      NWF$('.notActiveURL a').attr('onclick',null); 
      NWF$('.notActiveURL a')[0].onclick=null; 
      NWF$('.notActiveURL a')[0].click=null; 
      NWF$('.notActiveURL a').css('pointer-events','none'); 
      NWF$('.notActiveURL a').css('cursor','default'); 
      NWF$('.notActiveURL a').css('text-decoration','none');  
      NWF$('.notActiveURL a').css('color','inherit');  
    } 
}) 

Add the CSS notActiveURL to the control you want to apply this too.

Sorry for the delay,

-JC

Badge +5

Marian, 

So far I've not encountered this behavior.  I will post back if I encounter this.  

Thanks,

-JC

Badge +3

‌ Hello, does this work for Nintex Forms version 2.9.1.0?

Badge +5

Sorry, I don't have access to a previous versions of the forms to test.

Reply