Aaltuj / VxFormGenerator

The library contains a component, that nests itself into the Blazor EditForm instead of a wrapper around the EditForm. The component is able to generate a form based on a POCO or a ExpandoObject. Because of this architecture the library provides the developer flexibility and direct usage of the EditForm.
MIT License
119 stars 36 forks source link

Custom attributes on model to facilitate conditional display of entry fields #30

Open pm64 opened 3 years ago

pm64 commented 3 years ago

There are cases where we only display field Foo if the user enters value x into field Bar.

The most common example is probably a dropdown with an "other" selection that causes an additional text input to be displayed.

If https://github.com/Aaltuj/VxFormGenerator/issues/29 were implemented, I could achieve this behavior by manipulating the generated form. But the requirement is so common that specifying the conditional display logic using custom attributes on the model would be ideal.

Aaltuj commented 3 years ago

Please see my response in #29 :)