Forum Discussion

barakathcs's avatar
barakathcs
Copper Contributor
Nov 25, 2022

Multi stage SharePoint form layout

Are there any JASON or JavaScript available for muti-stage SharePoint list form customisation? I know this can be done with the help of PowerApps or Nintex but we wanted to keep the form view simple same as out of box item.

 

 

 

 

  • barakathcs 

    In addition to my previous message:

    In combination with the mentioned conditional formulas to hide fields for some stages you could use a header formatting JSON to make the default SharePoint form look more like your sample, but you still won't get the "Next"/"Previous" Buttons



    {
        "elmType": "div",
        "style": {
          "display": "flex",
          "flex-wrap": "wrap",
          "flex-direction": "row",
          "justify-content": "space-evenly",
          "width": "100%"
        },
        "attributes": {
          "class": "ms-fontSize-18"
        },
        "children": [
          {
            "elmType": "div",
            "style": {
              "display": "flex",
              "flex-direction": "column",
              "align-items": "center",
              "margin": "20px",
              "white-space": "nowrap"
            },
            "children": [         
              {
                "elmType": "div",
                "style": {
                  "margin-bottom": "10px"
                },
                "attributes": {
                  "iconName": "=if([$Stage] == 'Stage1' ,'CompletedSolid' , 'CircleShapeSolid')",
                  "class": "='ms-fontSize-42' + if([$Stage] == 'Stage1' ,' ms-fontColor-success' , ' ms-fontColor-neutralTertiary')"
                }
              },
              {
                "elmType": "div",
                "txtContent": "Stage 1"
              }
            ]
          },
          {
            "elmType": "div",
            "style": {
              "display": "flex",
              "flex-direction": "column",
              "align-items": "center",
              "margin": "20px",
              "white-space": "nowrap"
            },
            "children": [      
              {
                "elmType": "div",
                "style": {
                  "margin-bottom": "10px"
                },
                "attributes": {
                  "iconName": "=if([$Stage] == 'Stage2' ,'CompletedSolid' , 'CircleShapeSolid')",
                  "class": "='ms-fontSize-42' + if([$Stage] == 'Stage2' ,' ms-fontColor-success' , ' ms-fontColor-neutralTertiary')"
                }
              },
              {
                "elmType": "div",
                "txtContent": "Stage 2"
              }
            ]
          },
          {
            "elmType": "div",
            "style": {
              "display": "flex",
              "flex-direction": "column",
              "align-items": "center",
              "margin": "20px",
              "white-space": "nowrap"
            },
            "children": [        
              {
                "elmType": "div",
                "style": {
                  "margin-bottom": "10px"
                },
                "attributes": {
                  "iconName": "=if([$Stage] == 'Stage3' ,'CompletedSolid' , 'CircleShapeSolid')",
                  "class": "='ms-fontSize-42' + if([$Stage] == 'Stage3' ,' ms-fontColor-success' , ' ms-fontColor-neutralTertiary')"
                }
              },
              {
                "elmType": "div",
                "txtContent": "Stage 3"
              }
            ]
          }
        ]
      }


     

Resources