Closed bbbart closed 2 years ago
Can you provide more details on this issue? For example, the template, Bootstrap version, the screenshot of the current render result, and your expected result.
If the label for the radio button is missing, it seems to be a bug.
For ref: https://getbootstrap.com/docs/5.0/forms/layout/#inline-forms
I just tested this locally, and the rendering result of the inlineRadioField
is correct.
If you want to make the radio buttons rendered horizontally, you may need to manually write the Bootstrap code.
Hi!
So sorry for my late reply and thank you for following this one up.
I'm a bit confused now, as I was referring to
where one can see that inline RadioFields explicitly get a visually hidden label, no?
You are right that manually writing HTML instead of relying on the provided macros is a way out here.
The code should be correct, when the form type is inline, the radio field label should be hidden, and only the item labels were displayed.
https://getbootstrap.com/docs/5.0/forms/layout/#inline-forms
You may want to set the form type to horizontal
.
Yes, I also believe the code is according to the bootstrap documentation. I think I need to figure out the rationale behind that, then.
Thank you for your efforts!
When you render a form with
form_type="inline"
the form labels get the classvisually-hidden
assigned to them.I was wondering what the rationale behind this is? Is this a best practice of some sort?
Perhaps I'm not using the
form_type
correctly. What I'm looking for is a way to have my radio buttons rendered horizontally.