Started: 9/20/2018 8:00 AM
Picture: Rafeef Sabri
Rafeef Sabri
How to open in View mode versus Edit

From SharePoint list view, whether you choose "View Item" or "Edit Item", the form opens in what can be described as Edit Mode. Is there a way to behave like the regular SharePoint form whereby there is a difference between Editing and Viewing? Like in View mode the form opens and all controls are disabled unless Edit is clicked in Ribbon?

Picture: Rafeef Sabri
  • Rafeef Sabri
http://www.itlaq.com:80/my/User%2520Photos/Profile%2520Pictures/rafeef_MThumb.jpg?t=63623642040" alt="Picture: Rafeef Sabri" />
Rafeef Sabri

From SharePoint list view, whether you choose "View Item" or "Edit Item", the form opens in what can be described as Edit Mode. Is there a way to behave like the regular SharePoint form whereby there is a difference between Editing and Viewing? Like in View mode the form opens and all controls are disabled unless Edit is clicked in Ribbon?

19/20/2018 8:00 AM9/20/2018 8:00 AMNoSPARK Forms
6.89654112055044
49/20/2018 8:00 AM3
Jim Hidson
Sergio Schinoff
Nancy Castelo
Posted: 9/23/2018 3:53 AM
Picture: Jim Hidson
Jim Hidson

SPARK philosophy is to work the way InfoPath forms work and as you know InfoPath forms open the same form if you click new, edit or view unless you build other views and direct it through rules.

 

The same thing here but what  you can do is that you can utilize the parameter "type" in the url which can have "New, Edit or Disp" values depending on the request itself, and using SPARK internal function getFormQueryString().

 

To do that just move your controls into a panel, add a new rule with type formatting – (onLoad) to this panel, check the Disabled option in the bottom of the rule manager and set this condition in the condition area to be:

getFormQueryString('type') == 'Disp'

 

publish the form and you will find that when you view the form you will find it disabled, this technique will all the designer to work on one template for all the states of the form while letting the rules manages what sections to display or disable.​

Picture: Jim Hidson
  • Jim Hidson
http://www.itlaq.com:80/my/User%2520Photos/Profile%2520Pictures/jim_MThumb.jpg?t=63627189186" alt="Picture: Jim Hidson" />
Jim Hidson

SPARK philosophy is to work the way InfoPath forms work and as you know InfoPath forms open the same form if you click new, edit or view unless you build other views and direct it through rules.

 

The same thing here but what  you can do is that you can utilize the parameter "type" in the url which can have "New, Edit or Disp" values depending on the request itself, and using SPARK internal function getFormQueryString().

 

To do that just move your controls into a panel, add a new rule with type formatting – (onLoad) to this panel, check the Disabled option in the bottom of the rule manager and set this condition in the condition area to be:

getFormQueryString('type') == 'Disp'

 

publish the form and you will find that when you view the form you will find it disabled, this technique will all the designer to work on one template for all the states of the form while letting the rules manages what sections to display or disable.​

Rafeef Sabri1909/23/2018 3:53 AM9/23/2018 3:53 AM
9/19/2018 7:49 AM1
Sergio Schinoff