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

jquery alerts

Is there any way to use jquery alerts in NintexForms?

Ex; jAlert('This is a custom alert box', 'Alert Dialog');

Thanks

Labels: (1)
Reply
10 Replies
Workflow Hero

Re: jquery alerts

Hello gokulnath palani​,

Yes, this is very possible! What you'll want to do is open up Form Settings > Custom JavaScript and paste in the following:

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

  alert("this is a test alert.");

});

Good luck!

Patrick

Accept as Solution Reply
Not applicable

Re: jquery alerts

Hi,

Thanks Patrick Abel .I know this alert. But i need custom alert like this,

jQuery Confirm – Multipurpose Web Alert & Confirm | jQuery Plugins

Accept as Solution Reply
Workflow Hero

Re: jquery alerts

I use Toastr by CodeSeven .

In toastr.js You have to replace '$.' and '$(' by 'NWF$.' and accordingly 'NWF$(' to use it in Nintex Forms.

Kind regards

Manfred

Accept as Solution Reply
Not applicable

Re: jquery alerts

Hi Manfred,

     First we have to reference the toastr.min.js and toastr.min.css in in Advanced Section ( Custom Javascript  includes section ) of NintexForm.

     Then we have to copy and paste the code in Form Settings -> Custom JavaScript .Below is the code i get it from CodeSeven site.

Command: toastr["success"]("Are you sure want to exit?", "Alert")

toastr.options = {

  "closeButton": false,

  "debug": false,

  "newestOnTop": false,

  "progressBar": false,

  "positionClass": "toast-top-right",

  "preventDuplicates": true,

  "onclick": null,

  "showDuration": "300",

  "hideDuration": "1000",

  "timeOut": "5000",

  "extendedTimeOut": "1000",

  "showEasing": "swing",

  "hideEasing": "linear",

  "showMethod": "fadeIn",

  "hideMethod": "fadeOut"

}

Is it correct?

Thanks.

Accept as Solution Reply
Workflow Hero

Re: jquery alerts

Hi gokulnath palani

that's correct. Instead of array notation You can also use dot notation:

toastr.success("Are you sure want to exit?", "Alert");

But first You have to adapt toastr.js or toastr.min.js to Nintex Forms version of jquery (NWF$) as I described in my first answer.

Kind regards

Manfred

Accept as Solution Reply
Workflow Hero

Re: jquery alerts

if(Some Condition)

{

var confMsg=confirm('Are you sure you want to close the form without saving?');

return confMsg;

}

else

{

return true;

}

Accept as Solution Reply
Not applicable

Re: jquery alerts

Hi Manfred,

I downloaded the both toastr.min.js and toastr.min.css ,But i don't know where to change that '$.' and '$(' by 'NWF$.' and 'NWF$(' .If you have Nintex Version of toastr.min.js & toastr.min.css ,Please send me. I know how to use sp services in nintex forms by changing jquery to NWF$ ,but here i cannot,So please share if u have.

Thanks,

Gokulnath

Accept as Solution Reply
Not applicable

Re: jquery alerts

Hi,

Above is code i am using currently .But I need some effects Like (Fade in or fade out ). This is what i am trying.

Here is the code i have used ,

if(conform=="Are you sure want to close?")

{

window.location="url";

}

else{

window.location="url";

}

Thanks

Accept as Solution Reply
Workflow Hero

Re: jquery alerts

I have attached modified toastr.js.

Accept as Solution Reply