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

Add support for control rules #35

Merged
merged 3 commits into from
Oct 5, 2023
Merged

Conversation

dontub
Copy link
Collaborator

@dontub dontub commented Sep 15, 2023

This PR adds support for JSON Forms rules (https://jsonforms.io/docs/uischema/rules/) via Drupal Form #states (https://www.drupal.org/docs/drupal-apis/form-api/conditional-form-fields). This approach has some limitations:

  • Scopes must reference a concrete form field, i.e. no object or arrays are possible.
  • schema is limited to the keywords const, enum, properties, and not.

@dontub dontub force-pushed the add-support-for-control-rules branch from 4c243f7 to 76478ba Compare September 15, 2023 13:47
src/Form/Control/Rule/StatesBuilder.php Show resolved Hide resolved
src/Form/Control/Util/FormPropertyUtil.php Outdated Show resolved Hide resolved
src/Form/Markup/HtmlMarkupArrayFactory.php Outdated Show resolved Hide resolved
@dontub dontub merged commit e189989 into main Oct 5, 2023
14 checks passed
@dontub dontub deleted the add-support-for-control-rules branch October 5, 2023 16:30
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