pnp / pnpjs

Fluent JavaScript API for SharePoint and Microsoft Graph REST APIs
https://pnp.github.io/pnpjs/
Other
764 stars 305 forks source link

Is there an API to update List Item View/Edit/Add Form formatting with JSON #3139

Closed jamesm2024 closed 2 months ago

jamesm2024 commented 2 months ago

What version of PnPjs library you are using

3.x

Minor Version Number

3.25.0

Target environment

SharePoint Framework

Additional environment details

SharePoint Online, React

Question/Request

Just wondering if there is an API to pass JSON to a list item form (header/body/footer)

https://learn.microsoft.com/en-us/sharepoint/dev/declarative-customization/list-form-configuration

Form JSON Formatter

juliemturner commented 2 months ago

There's a property on the column (list or site) called "CustomFormatter" that takes a stringified JSON object as the field.

jamesm2024 commented 2 months ago

Hi Julie, I have looked at the columns of the list but there is no "CustomFormatter". Could you provide a little more information. Thanks James

juliemturner commented 2 months ago

No there isn't a field called CustomFormatter there's a property of a field called CustomFormatter.

juliemturner commented 2 months ago

And for header, footer, and body formatting the ContentType has a property "ClientFormCustomFormatter"

jamesm2024 commented 2 months ago

All good. Have updated JSON formating in ContentType and all is working well. Thanks

juliemturner commented 2 months ago

I'm going to close this issue as answered. If you have further issues, please feel free to create a new issue and reference this one.

github-actions[bot] commented 1 month ago

This issue is locked for inactivity or age. If you have a related issue please open a new issue and reference this one. Closed issues are not tracked.