How to get form mode using JavaScript in Nintex Online

Unlike SharePoint Designer, there is no separate form for New, Edit and Display in Nintex form designer. 
Keeping this limitation in mind, only one form will serve for all the three purpose.

There are two options to add JavaScript in Nintex Form, 

1. Internal (directly add JavaScript while design the form)
2. External (upload JavaScript File in Site Assets and reference to Nintex form).

If you are using Internal JavaScript you have the property Is Edit Mode









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.

If you closely watch the URL, you can find a querystring "mode" which represent the mode of form (New/Edit or Display form). For new, edit, display the modes are 0,1 and 2 respectively.

// 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){
}


Comments

  1. The King Casino | Situs Judi Slot Online Terbaik 2021
    Play gri-go.com online Pragmatic Play Slots at The King https://septcasino.com/review/merit-casino/ Casino - Member Baru & Terpercaya 2021! Rating: ventureberg.com/ 98% · wooricasinos.info ‎240,388 filmfileeurope.com votes

    ReplyDelete

Post a Comment

Popular Posts