leif_frederikse
Apprentice

Re: Nintex Form tries to open but is grayed out

Jump to solution

What realy seems strange to me is that the z-index of the ms-dlgOverlay "randomly?" changes. Sometimes it is set to 1504 and everything works fine, and sometimes it is set to 1509, which causes the unwanted effect of the dialog beeing covered.

I have not been able to find out what/where/who actually assigns the value. Can anybody help clear this up?

Regards

Leif

0 Kudos
Reply
cju
Scout

Re: Nintex Form tries to open but is grayed out

Jump to solution

Actually there can be several modal dialogs opened, that's why the z-index is automtically calculated and is not a fixed value.

I don't how it is calculated but you can use javascript in your Nintex Forms to get the z-index of the current modal dialog and then decrease the z-index of the overlay.

Hope this helps

0 Kudos
Reply
leif_frederikse
Apprentice

Re: Nintex Form tries to open but is grayed out

Jump to solution

I use this code to examine and set the z-index:

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

var overlay =     NWF$('.ms-dlgOverlay');

var dialogue = NWF$('.ms-dlgContent');

console.log("z-index of overlay before: " + overlay.zIndex());

console.log("z-index of dialogue before: " + dialogue.zIndex());

    NWF$('.ms-dlgOverlay').zIndex( '1500');

    NWF$('.ms-dlgDialogue').zIndex( '1600');

console.log("z-index of overlay after: " + overlay.zIndex());

console.log("z-index of dialogue after: " + dialogue.zIndex());

});

Strangely, my console output reports 0 on both elements, both before and after:

Untitled.png

When I then examine the actual values through the browsers DOM explorer I get this:

Untitled.png

Is there something wrong with my code, or is there another explanation for z-index not beeing available?

I run the code at NWF$(document).ready...

Maybe this is "too soon" because there is an algorithm somewhere in Sharepoint that tries (and fails) to assign some meaningfull z-index values?

Is there and alternative to (document).ready that is "a bit later"?

Regards

Leif

0 Kudos
Reply
cju
Scout

Re: Nintex Form tries to open but is grayed out

Jump to solution

You can try to execute your code at this event :

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

// Add your code here

});

0 Kudos
Reply
leif_frederikse
Apprentice

Re: Nintex Form tries to open but is grayed out

Jump to solution

OK - I think I got it now:

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

   var dialog  = window.parent.document.getElementsByClassName('ms-dlgContent')[0].style.zIndex = 1510;

});

The problem with the code I tried before, seemed to be that I was not succesfull in actually getting to the right elements, since the dialogue itself was in an IFRAME. This is why the "window.parent..." is needed, instead of just looking in the current document with NWF$.

That is actually also what Alan suggested with his code: parent.$('body').find('div.ms-dlgOverlay').css('z-index', '1500');

But when I tried that, I got an error that the "$" was unknown. That got me sidetracked, and I only now got back to examining the parent.

Out of curriosity - why can I not refer $? ANd given that i CAN refer NWF$, how would my jquery syntax be to accomplish the same thing?

Regards

Leif

0 Kudos
Reply
cju
Scout

Re: Nintex Form tries to open but is grayed out

Jump to solution

Exactly that's a great idea to get it from the parent window.

Nintex has added his own version of JQuery that's why NWF$ (Nintex' JQuery version) is available and not $. But standard JQuery ($) is included in SharePoint 2013. The version included by SharePoint may not be already loaded when document ready event fires or to avoid JQuery conflict, it is maybe not available when NWF$ is included (I'm not sure about this point).

So, the syntax would be parent.NWF$('body').find('div.ms-dlgOverlay').css('z-index', '1500');

Hope this helps

0 Kudos
Reply
Not applicable

Re: Nintex Form tries to open but is grayed out

Jump to solution

Do we have a "correct answer" in this thread? Anybody? :-)  If so, let me know and I'll mark it.

0 Kudos
Reply
jaivsa
Novice

Re: Nintex Form tries to open but is grayed out

Jump to solution

[if IE 9]  [endif] 


NWF.FormFiller.Events.RegisterAfterReady(function(){  
 console.log('assign z-index');
  setTimeout(function() { 
       
       parent.$('body').find('div.ms-dlgOverlay').css('z-index', '1500'); },500);
       console.log('assigned');
 });
0 Kudos
Reply
Clipper
Scholar

Re: Nintex Form tries to open but is grayed out

Jump to solution
Where did you put this ? I tried in the forms' custom CSS but that didn't change anything. I have the same issue, random grey out on random browsers.
0 Kudos
Reply
DaphneSantiago
Scholar

Re: Nintex Form tries to open but is grayed out

Jump to solution

While I appreciate that there's an Accepted Solution, this is not actually a solved issue.  Any idea if Nintex is planning to actually fix the problem?  It's been years, and it's an issue with the modern forms, too (which don't accept custom code/script so easily).  I've tried adding the CSS into a hidden label field, but it does not resolve the issue.  Any thoughts would be welcome.

Reply