Skip to content

Distribution: add example for hiding fields from the form.#1833

Merged
stevepiercy merged 3 commits into6.0from
maurits-destribution-uischema-hide
Jan 9, 2025
Merged

Distribution: add example for hiding fields from the form.#1833
stevepiercy merged 3 commits into6.0from
maurits-destribution-uischema-hide

Conversation

@mauritsvanrees
Copy link
Member

@mauritsvanrees mauritsvanrees commented Jan 9, 2025

I am making a distribution for a client.

  • I don't want to show the description field because it should remain empty (at least that is how it is on their current Plone 4 site).
  • I don't want to show the default_language field, because I am setting this (and four available languages) in the Generic Setup profile.
  • Same for the portal_timezone: it is a site for Belgium, so I am setting Europe/Brussels in the Generic Setup profile, so this timezone is always set, even when a colleague in Portugal creates a site on his laptop.

Unfortunately currently these fields have to be in the schema, as documented, otherwise you get an error. So instead I found out how to hide these fields.


📚 Documentation preview 📚: https://plone6--1833.org.readthedocs.build/

I am making a distribution for a client.

* I don't want to show the description field because it should remain empty (at least that is how it is on their current Plone 4 site).
* I don't want to show the default_language field, because I am setting this (and four available languages) in the Generic Setup profile.
* Same for the portal_timezone: it is a site for Belgium, so I am setting Europe/Brussels in the Generic Setup profile, so this timezone is always set, even when a colleague in Portugal creates a site on his laptop.

Unfortunately currently these fields have to be in the schema, as documented, otherwise you get an error.
So instead  I found out how to hide these fields.
@mauritsvanrees
Copy link
Member Author

Direct link to the updated section in the preview:

https://plone6--1833.org.readthedocs.build/developer-guide/create-a-distribution.html#schema-json

mauritsvanrees and others added 2 commits January 9, 2025 22:05
Co-authored-by: Steve Piercy <web@stevepiercy.com>
Copy link
Contributor

@stevepiercy stevepiercy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@stevepiercy
Copy link
Contributor

The failing test is addressed in a separate PR #1832. Merging, and thank you!

@stevepiercy stevepiercy merged commit fdfea7c into 6.0 Jan 9, 2025
1 of 2 checks passed
@stevepiercy stevepiercy deleted the maurits-destribution-uischema-hide branch January 9, 2025 21:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants