3 ms·
Yeah, I didn't now about data-* attributes until about two years ago. I quickly leveraged it to make creating forms with branching less of hassle: instead of re
by jonnycomputer 5y ago
Yeah, I didn't now about data-* attributes until about two years ago. I quickly leveraged it to make creating forms with branching less of hassle: instead of relying on complicated state to hide and show different divs, I simply used data-next and data-previous attributes to govern navigation through the tree.
- varrock 5y agoWhen you say branching, are you talking about a dynamic input, e.g., an email text input that appears after a subscribe checkbox is selected?
- jonnycomputer 5y agoWhen there are dependencies between questions in a form (e.g. only ask for date married if answered yes to married). Its confusing if those elements are visible when not needed, so yeah, becomes dynamic. Also, I used "tree" loosely. I meant something closer to a DAG.