Support branching on fieldsets for more flexibility
Status quo:
Conditionals must be set on tag-level, adding them on eg. fieldset-tag does nothing.
Problem:
This is great for simple paths, but for paths which branch off into completely different directions multiple times, it makes it unnecessarily hard. You'd have to set a number of conditional tags on every single input field.
For example, I'm currently working on a form which is a mostly boolean based input, with the answer of almost every question branching off into a new path. Moreover, some paths do eventually require an input field which has the same name attribute as used in other branches, which currently also causes a bug. See issue #327
Solution:
Allow conditionals to be set on fieldset tags.
This would allow all inputs that belong to a specific path to be grouped together, making it much easier and clearer to maintain. Since all input that doesn't fall under the fieldset can be ignored, this should also resolve #327.
@egyptik this would be a very nice extension to the current branching logic. If it is important to you then maybe you want to consider contributing with a PR? 😎
@jenssogaard I'd be happy to, but can't get it to work. Do you have any instructions?
I tried the following:
- Cloned the
Developbranch. - Ran
npm installin root dir. - Ran
npm installingulp-tasksdir. - Ran
gulp buildin root dir.
Besides a few TypeScript errors, this seemed to work. However, when I open one of the development HTML pages in /src it's having a lot of 404 errors for files located in /build/cf/ui/control-elements/*.
When checking my build folder, all I can find in /build/cf is a single file named ConversationalForm.plugin.js.