We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Trying to create a custom wrapper for checkboxes and radio buttons, I am hitting on a wall when trying to add the for attribute to a label wrapper.
for
The label contains markup with divs etcetera, which is allowed.
I tried this proposed solution, but being it rather old it does not seem to work: #869
The idea is to have a markup like this:
<label for="input_name" class="some clases"> <div>Something</div> <div> <div>something else</div> </div> </label>
Using the wrapper api, I do this:
a.wrapper tag: :label, class: "some classes" do |b| b.use :something, wrapped_with: {tag: :div} b.wrapper tag: :div do |c| c.use :something_else, wrapped_with: {tag: :div} end end
:something and :something_else are custom components, which work fine.
The markup is created, but there doesn't appear to be a method to add the for="input_name" in the label tag.
for="input_name"
Is there any way to override this? Shouldn't there be the possibility to use labels as wrappers, with their "for" attribute, for complex html markups?
Best regards, Stavros
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Trying to create a custom wrapper for checkboxes and radio buttons, I am hitting on a wall when trying to add the
for
attribute to a label wrapper.The label contains markup with divs etcetera, which is allowed.
I tried this proposed solution, but being it rather old it does not seem to work:
#869
The idea is to have a markup like this:
Using the wrapper api, I do this:
:something and :something_else are custom components, which work fine.
The markup is created, but there doesn't appear to be a method to add the
for="input_name"
in the label tag.Is there any way to override this?
Shouldn't there be the possibility to use labels as wrappers, with their "for" attribute, for complex html markups?
Best regards,
Stavros
The text was updated successfully, but these errors were encountered: