-
-
Notifications
You must be signed in to change notification settings - Fork 148
New issue
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
Option to render checkbox outside of label #106
Comments
Yes! |
Can you try to figure out any solution? |
I am thinking about this again :(
This is our problem: |
As you know I don't use nette/forms anymore... Currently I don't have a need nor time to solve this. |
Closed by accident... it should probably be left open in my opinion. |
It can be handled in custom renderer. In Don't know if it's good enought solution. But there is problem with radioList. Problem is here. If i would be able to switch those 2 lines, it would be good enought. What about 5. parameter for |
@Olicek Can you post the code for renderer? I need this on one of my older projects, fortunately only for single checkboxes, no lists. Also your link to the source doesn't work correctly anymore. You should lock it to one commit. |
@Olicek Actually I already solved it myself but thanks anyway. ;-) |
I suggest to:
The problem is that now you can't render checkbox list which is compatible with Bootstrap v5 (or v4 custom control) markup as Bootstrap requires that @dg Do you see any problem or BC break in making proposed changes? I can think only of broken styling if it depends on generated selectors and DOM structure: form label input[type=checkbox] {
border: 5px solid red;
} |
When you change the generated HTML, it is of course a BC break. |
Ok, so what do you suggest then? There should be some way how to affect generated code, if we can not afford to change it. |
Just add a method to toggle generated code, right? |
I don't understand. Generated code is of type |
$form->addCheckbox('xxx')
->renderLabelSeparately(); |
Ok, why not, as basic solution that should be enough. 👍 |
I'd like to be able to render checkbox (and radio) outside of the label tag. Without using manual rendering of course.
The reason is that I'd like to use awesome-bootstrap-checkbox to make them look better without using javascript.
The text was updated successfully, but these errors were encountered: