Opening the New form from another list using SharePoint list formatting


If you want to open the new form in another list using SharePoint Lists JSON formatting, it is pretty straightforward.

All you need to do is to use the href property in a link object inside of your custom HTML generated by list formatting, and point it to the relative path of the new item form of the list you want to open, for example:

/sites/<your site>/Lists/<your list>/NewForm.aspx

Imagine you have an issues list in your site, you could use the below JSON template:

{
  "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
  "elmType": "a",
  "attributes": {
    "class": "ms-fontColor-themePrimary  ms-fontWeight-semibold",
    "target": "_blank",
    "href": "/sites/SharePointFormsDemo/Lists/Issues/NewForm.aspx"
  },
  "style": {
    "text-decoration": "none"
  },
  "children": [
    {
      "elmType": "span",
      "attributes": {
        "iconName": "CircleAdditionSolid"
      },
      "style": {
        "margin-right":...

Source link

More About This Author

michelcarlo
michelcarlo
SharePoint and Office 365 Consultant/Developer always trying to get the best from Microsoft stack (Microsoft 365/Azure/Power Platform and related stuff).

Living in Ireland since 2018, I had previously worked in Brazil as a consultant/developer for Office 365, SharePoint and related technologies for almost 10 years.

Author: michelcarlo

SharePoint and Office 365 Consultant/Developer always trying to get the best from Microsoft stack (Microsoft 365/Azure/Power Platform and related stuff). Living in Ireland since 2018, I had previously worked in Brazil as a consultant/developer for Office 365, SharePoint and related technologies for almost 10 years.

Share This Post On
Share via
Copy link
Powered by Social Snap