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

Hide Control or group of controls dinamycally #28

Closed marcoCasamento closed 3 years ago

marcoCasamento commented 3 years ago

Is it possible to hide a control (or a group of control) based on a value of a EditForm element ? For example, imagine you have a form with a Combobox with values "Person", "Company". If the user selects "Person", I have to show fields Firstname/Lastname whereas if user selects "Company" I have to show just "CompanyName".

thanks

msaroka commented 3 years ago

I had this issue with a project I was working on. What I ended up doing was putting a toggle control on the page and two classes that inherited from the base class. When the page was reloaded it pulled the correct inherited class as the data source for the form.

marcoCasamento commented 3 years ago

thanks for your input, but in my case is not applicable. I need that the input must be defined inside the poco not statically placed on the page, so that I can define a "rule" that hides or shows elements based on the value of another field in the same poco object.

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.