kendraio / kendraio-app

Kendraio App
https://app.kendra.io
MIT License
22 stars 6 forks source link

How do we put logic into a JSONSchema form? #79

Open tim-deighton opened 5 years ago

tim-deighton commented 5 years ago

for example: As a user I specify I am over 18. The form should hide the Parents Consent checkbox and give me the opportunity to buy a beer.

darrenmothersele commented 5 years ago

As a reference: https://rjsf-team.github.io/react-jsonschema-form/

Look at the schemas for the "Schema dependencies" example

darrenmothersele commented 5 years ago

There are also oneOf and anyOf examples now added to the ngx-formly examples: https://ngx-formly.github.io/ngx-formly/examples/advanced/json-schema

This was added in v5.5 https://github.com/ngx-formly/ngx-formly/issues/1459#issuecomment-539998772