Hi All,
I am working one of the projects and when a user fills in the form (NewForm.aspx), he can enter all his form details.
However, when he submits and trying to edit the existing form (EditForm.aspx), he should not be able to fill in the Manager and remarks as shown:
I have read Nintex Community article to switch the mode and recommend to check the URL
var isNewMode = document.location.pathname.indexOf("/NewForm.aspx") > -1;
var isDisplayMode = document.location.pathname.indexOf("/DispForm.aspx") > -1;
var isEditMode = document.location.pathname.indexOf("/EditForm.aspx") > -1;
if(isNewMode)
{
alert("New");
}
if(isDisplayMode)
{
alert("Display");
}
if( isEditMode)
{
alert("Edit");
}
Q: How could I put this code inside my form?
Some other suggested to use following code.
Q: Do I have to use the custom JavaScript within the Common runtime function as shown below:
Can you someone please let me know, which is the best approach to achieve this?
Thanks!