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

using jQuery mask plugin for input field , working in design but not working in the display mode.

I have a simple text box, I'm trying to use jQuery mask for the input field, the custom code for test I'm using is this,

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

NWF$( ".PhoneNumber" ).change(function() {

NWF$( "#" + PhoneNumber ).mask("99/99/9999");

});

});

I downloaded all of these js files and added in the assets library and calling in the form settings ->Advance section.

jquery.inputmask/js at 3.x · RobinHerbots/jquery.inputmask · GitHub

It's working fine in the design Preview mode. But when I publish and create a new form it start throwing errors.

On initial form load I get, on all the js files I'm calling

Uncaught SyntaxError: Unexpected token <

and than after inital load complete when I enter input it show me.

Uncaught TypeError: NWF$(...).mask is not a function

Please guide.

Thanks.

0 Kudos
Reply
2 Replies
Automation Master
Automation Master

Re: using jQuery mask plugin for input field , working in design but not working in the display mode.

can you post how did you placed references to script files to the form settings?

have you by any chance enclosed them into script tag?

Reply
Not applicable

Re: using jQuery mask plugin for input field , working in design but not working in the display mode.

Marian,

I have two tickets in right now with support, both with the same problem.  In SharePoint Online Nintex Forms, none of the calls for anything on the host SharePoint site are working.  The script includes fail, and I'm also performing a JSOM read of a SharePoint list that also fails.  On the latter, if I run in debug mode, the async call has time to complete, but if I just include it in the form's ready method, it locks up the entire form.  If I setTimeout the call for five seconds, I get five seconds to type, then it locks up the form.  So it's ALL to do with calls to the host web, from within the app context of the Nintex form.  It's entirely possible that Microsoft has done something that messes up Nintex Forms' ability to make the cross-origin call.

0 Kudos
Reply