Solved

How to switch modes (New / Edit / Display) in Nintex form?

  • 1 February 2017
  • 6 replies
  • 365 views

Badge +9

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!

icon

Best answer by xMikeX 2 February 2017, 03:41

View original

6 replies

Badge +9

I'm trying to understand your requirement.

---

Once the "New" form is submitted and opened up buy anyone BUT the manager the Manager Remarks should be disabled

If the manager Opens the Edit form they should be able to enter remarks

---

If the above is correct you can just put a Rule on the Remarks coloumn of CurrentUser!=ManagerPeoplePicker and set it to Disabled

Badge +9

Thanks Warwick Ward for your time to view my issue. 
I have around 70-80 fields when a user submits when he enters within NewForm.aspx. 
When I manager approves, he need to just fill his/her remarks within EditForm.aspx.

 

But EditForm is editable for all 70-80 fields. 

 

Q: Where I can EditForm.aspx within Nintex Form and make these  70-80 fields disabled form? 
Thanks! 


 

Badge +9

That's the beauty of Rules, create it once and apply to every control that you want to disable.

Badge +6

Hey Sandy,

you can configure this directly in the configuration of the desired controls:

But the best way would be to achieve this with the help of rules as ‌ already mentioned! You could put all desired controls into a panel and then disable the whole panel with the help of a rule.

Best regards,

Jan

Userlevel 5
Badge +12

  - this might help a bit too!

Badge +9

Thanks ‌ for your inputs!

Reply