Skip to main content
Nintex Community Menu Bar
Solved

Getting error 'NWF$' is undefined when calling NWF in developer tools on my form

  • December 8, 2015
  • 6 replies
  • 262 views
  • Translate

Forum|alt.badge.img+5

I'm trying to write some JavaScript against my Nintex Form but can't access NWF$ or $, I get the error 'NWF$' is undefined, and when I access $ all objects just return null.

 

Am I just doing something silly? I have a 30 day trial account.

 

Help appreciated happy.png I have attached a screenshot.

Best answer by rebecca_gordon

Hey everyone,

So I finally figured out that if you set a breakpoint in your code, you can run commands against the console. Usually when I'm just writing some quick JQuery and checking whether my selections are correct e.g. NWF$('.jsLeaveDuration').find('label').html(); I will write it into the console once the page has loaded, without debugging.

Must be because it's in an iFrame and without setting a breakpoint, the console window doesn't run against what is in the iFrame because it's not inside that scope?

Interesting...

View original
Did this topic help you find an answer to your question?

Forum|alt.badge.img+17
  • December 8, 2015

When are you getting the context to act upon the form? I would check out the post Using JSOM in Nintex Forms for O365​ as a start to get things connected. Let us know if this helps.

Translate

Forum|alt.badge.img+5

I'm waiting till page has fully loaded and running code with developer tools. I had a look at the post you linked, I can't even see NWF object. I've logged a support call, hopefully it's just something silly I'm doing and not a corrupt environment or something will post what comes back from support.

Translate

Forum|alt.badge.img+5

Thanks everyone for responses.

I made sure I was selecting objects inside the iframe with the dom selector before running code in the console, still no luck .

Translate

Forum|alt.badge.img+5

Hey everyone,

So after some more investigation, I have tested that the code is fine when you insert it into the form and run the form. It just doesn't work with developer tools. There may be a way to still debug it, but selecting the iframe and running the code doesn't work.

I'll post again when I find out more information. For now the workaround will be to develop and debug through Nintex, which is a pain having to publish each time and debug through alerts and logs haha. Other options is to save the file in SharePoint (permissions allowing) or to a CDN.

Translate

Forum|alt.badge.img+5

Hey everyone,

So I finally figured out that if you set a breakpoint in your code, you can run commands against the console. Usually when I'm just writing some quick JQuery and checking whether my selections are correct e.g. NWF$('.jsLeaveDuration').find('label').html(); I will write it into the console once the page has loaded, without debugging.

Must be because it's in an iFrame and without setting a breakpoint, the console window doesn't run against what is in the iFrame because it's not inside that scope?

Interesting...

Translate

Forum|alt.badge.img+5

The original question wasn't really answered, but I have marked my workaround as the response to help with people finding answers for the same issue

Translate

Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie Settings