labels and wrappers #38
jeremyevans
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Google Group Post: https://groups.google.com/g/ruby-forme/c/CK3nSWmy_D4
Google Group Date: Sat, 10 May 2014 22:25:03 -0700
Google Group Sender: group...@grandfenwick.net
I’m trying to wrap my head around wrappers. They tend to do things other than what I expect, but I think I’ve decoded enough of it to know that there’s a problem. I think in order to use Forme and get the output the way I want it, specifically, to have fields (not the labels, but the actual fields) aligned, I’ll have to bypass Forme’s wrappers entirely, and probably the labeler as well.
The w3schools.com web site has the following example for the tag:
Male
“” wraps just the label text. The input is a sibling, not a child.
Forme does this:
Male <input type="radio" name="sex" id="male" value="male”>
It looks like this is a result of managing labels as sort of a special class of wrapper, where it takes the input and the label and makes it all a child of . Unfortunately, that’s not a flying toy, because it prevents being able to format the input in a table:
MaleSince Forme does seem to construct unique IDs for most or all inputs, at least part of what’s required for sibling labels appears to be in place.
{update}
I’ve rewritten the code on my forked version.
Beta Was this translation helpful? Give feedback.
All reactions