Skip to main content
Nintex Community Menu Bar
Solved

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

  • February 1, 2017
  • 6 replies
  • 505 views
  • Translate

ArohShukla
Forum|alt.badge.img+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!

Best answer by xMikeX

  - this might help a bit too!

View original
Did this topic help you find an answer to your question?

6 replies

Forum|alt.badge.img+9
  • 206 replies
  • February 1, 2017

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

Translate

ArohShukla
Forum|alt.badge.img+9
  • Author
  • 82 replies
  • February 1, 2017

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! 


 

Translate

Forum|alt.badge.img+9
  • 206 replies
  • February 1, 2017

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

Translate

Forum|alt.badge.img+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

Translate

Forum|alt.badge.img+12
  • 852 replies
  • Answer
  • February 2, 2017

  - this might help a bit too!

Translate

ArohShukla
Forum|alt.badge.img+9
  • Author
  • 82 replies
  • February 2, 2017

Thanks ‌ for your inputs!

Translate

Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie Settings