Skip to content

Model field dependencies - a question #579

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

Closed
lafar6502 opened this issue Oct 18, 2015 · 2 comments
Closed

Model field dependencies - a question #579

lafar6502 opened this issue Oct 18, 2015 · 2 comments

Comments

@lafar6502
Copy link

Hi, i've got a question about expressing dependencies between form fields. I know that you can show or hide a field based on condition expression, but what about other scenarios like:

  • hide or show entire form section
  • make field required, editable or read only depending on other field values
  • limit the options available in a select according to other values entered
  • validation dependent on a combination of several field values

thanks, maybe there are some examples of the above?

PS your promotional video is really good!

@Anthropic
Copy link
Member

  1. hide or show entire form section is already supported using conditions
  2. & 3. Add the field as many times as needed to the form definition with conditions to determine which is displayed
  3. You can add your own validators, there are discussions about supporting anyOf and oneOf from json schema, I made my own directive to handle that validation.

With 3 I have an add-on that does this called external options, it just isn't as complete as I would like it to be, but it could give you some ideas :)

@lafar6502
Copy link
Author

thanks

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

2 participants