asigloo / vue-dynamic-forms

Easy way to dynamically create reactive forms in Vue based on a varying business object model
https://vue-dynamic-forms.netlify.app/
MIT License
395 stars 45 forks source link

Triggered Dependent Fields #290

Open eyleron opened 2 years ago

eyleron commented 2 years ago

Is your feature request related to a problem? Please describe.

A common pattern in forms is that fields can trigger other fields to show/hide/require/un require.

"Will you be bringing a date?" True => showField([date_first-name, date_ladt-name]

If item in enum, if string, if date less than, checkbox boolean, then show/hide/require/unrequire /clear field or fieldset or page...

Reference with examples: https://github.com/wearebraid/vue-formulate/issues/230

Describe the solution you'd like

A model for describing form behavior beyond just field validation.

Describe alternatives you've considered

Vue-formulate initially said "use computed" but the problem with this is it breaks the paradigm of declarative models for forms. Imagine having hundreds+ of forms needing logic like this, edited in an admin editor. One can't hand-edit computed functions.

VueFormulate's successor is supposedly adding this, as most competitors have.

Additional context

No response

Validations