Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The schema support assumes I want to ask for variable input, can I force a value and make a field read only? #92

Open
fredvd opened this issue Jun 26, 2024 · 1 comment

Comments

@fredvd
Copy link
Member

fredvd commented Jun 26, 2024

The schema describes the form that is presented to the user creating the site.

But what If I want to 'fixate' some variables, like the default language, portal timezone, site title/id, etc? I assume I could fix this in a pre or post-handler, but it would be nice to also support a 'read only' version in the schema.json where the value is already set.

use case: I want to create a 'fixture' in a project where the testing-pages for a project are included in code during development and a frontender just has to create the backend site from a distribution for local dev setup. One identical configuration for all devs.

@fredvd fredvd changed the title The schema support assumes I want to ask for variable input, can I force a value The schema support assumes I want to ask for variable input, can I force a value and make a field read only? Jun 26, 2024
@fredvd
Copy link
Member Author

fredvd commented Jun 27, 2024

Also, according to the readme these fields are required, which is strange are thereis also a required key and a pre_handler can override the answers to provide fixed values. IMHO only site_id should still be required as it needs to be calculated and shown to the end user for id collissions:

these are listen in the readme as required, but shouldn't, as I could set them in a pre_handler:

site_id
title
description
default_language
portal_timezone
setup_content

portal_timzeone seems not to be required, and is not even missed when not setting it in the pre_handler.

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

No branches or pull requests

1 participant