Posts

Showing posts with the label Nintex for Office 365 Form

Nintex Online for Office 365 Form: How to Know Form Mode using JavaScript

Image
In Nintex Form for office 365, unlike SharePoint Designer, there is no separate form for New, Edit and Display Form. So, we need to design the form to keeping this limitation in mind. There are two options to add JavaScript in Nintex Form, Internal and External. If you are using Internal JavaScript you have the option like But If you are using External JavaScript (which is good practice) the (Is Edit Mode) will not work. In this case we can use below script. In this URL, the querystring "mode" represents the New/Edit and Display form. For NewForm mode=0, for EditForm mode=1 and for DisplayForm mode=2. // For New Mode if(window.location.href.toLowerCase().indexOf("mode=0") > 0){ } // For Edit Mode if(window.location.href.toLowerCase().indexOf("mode=1") > 0){ } // For Display Mode if(window.location.href.toLowerCase().indexOf("mode=2") > 0){ } The above code is very useful when you reference the external JavaScript...

Nintex Online for Office 365 Form: How to customize Print to PDF functionality using JavaScript

Image
In Nintex Online for Office 365, the Print to PDF button is available in ribbon. But if you want to implement the same functionally in your custom JavaScript button then follow below steps. Step 1:   Add a button, Set the property Button Action: JavaScript Button Type: Button Button Lebel: Print to PDF Cause Validation: No Client Click: printToPDF(); Step 2: Go to Ribbon- Designer- Form Settings-Custom JavaScript and add below code function printToPDF(){ NF.PrintToPDF(window).Print(); return false; } Click Save - Publish the Form By default, it will print the whole form. But if you want to hide certain elements on PDF, at first hide using jQuery and then call NF.PrintToPDF(window).Print() function, like function printToPDF(){ NWF$('.menuButton').hide(); NF.PrintToPDF(window).Print(); NWF$('.menuButton').show(); return false; } :-)