How do I access the divs inside a rendered block of radio buttons
-
12-11-2019 - |
Question
I noticed radioField gives back a blob that cannot be obviously iterated through via hamlet. I'd like to be able to manipulate the divs inside the blob to make them a css class member. I have thought of two ways. (1) Make a custom form. This seems like overkill to me. (2) Make a hardcoded html form. This seems unsatisfying. I'd like a way to programmatically do it. Is there an alternative to making a custom form?
Solution
If you just want to make divs members of CSS class, you can instead just wrap the result of selectRadio (do you mean radioField in fact?) in another div.your-class, and use a CSS selector .your-class div
or .your-class > div
. Yes, this is not an answer exactly to your question, but maybe it helps in your problem?