Closed aaachen closed 1 month ago
This has been in my mind for some time already, and believe it or not, the implementation I was thinking was exactly the same. This is a duplicate of #71 , but because that one were 2 requests in one, and I already fulfilled one, I will favor this request as is better written and more focused.
This has been already implemented some time ago. Not sure why I forgot to close this issue.Hope you find it useful
My Usecase
I log the exercises I do and the associated information. Different exercises have different information that I need to input. For example, running requires input miles and time, push up requires input reps and sets, dumbbell curl requires reps, sets, and weight.
I want to customize my form in such a way that depending on the exercise picked, the form renders the correct inputs
Describe the solution you'd like
This would be an advanced option configurable for each form input (call it Conditional Render)
Conditional Render is a js function that given the state of the
form
object, return boolean for whether to render the input.Work around I use quick add, the workaround here for that is to create separate forms and chain them (i.e. using the exercise example, first ask for the exercise, then the correct form to show)
This is less ideal as I prefer just one reactive form