question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Additional CSS id or class for fieldset and .form-group

See original GitHub issue

It would be very handy for custom styling if you could style a generated fieldset from a group with custom css. Would it be possible introduce as css or id parameter for groups besides legend or could a normalized representation of a group’s legend be used for auto-generating a CSS id or class for the HTML fieldset?

The same applies to generated div.form-group wrappers around each field. An auto-generated CSS id or class would be very helpful.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
zoul0813commented, Jan 25, 2018

Here’s an example of using Bootstrap 3 with VFG, creating two side-by-side groups … and the “Skills” and “Status” fields are also side-by-side …

https://jsfiddle.net/zoul0813/k6gzcj6b/5/

1reaction
zoul0813commented, Jan 24, 2018

You can provide a styleClasses for the group and use that to style the legend, and the fields styleClasses to apply a CSS class to a field specifically.

Here’s a sample Fiddle: https://jsfiddle.net/zoul0813/k6gzcj6b/4/

Read more comments on GitHub >

github_iconTop Results From Across the Web

Add a css class to a field in wtform - flask - Stack Overflow
For this reason, I advise you to set a specific class using Jinja 2 in your template, not in your flask app code....
Read more >
Is there any way to add css class or id to a group
Hi,. Is there any way to add Id attribute or Class attribute to a group tag when Form-tag Generator popup is show. I...
Read more >
bootstrap fieldset - code helper
The .form-group class is the easiest way to add some structure to forms. It provides a flexible class that encourages proper grouping of...
Read more >
umbraco 7 forms custom css and div tags - Contour
Hi. How is it possible to achieve this with Umbraco Forms (wrap a div and a class around every input field): <form role="form">...
Read more >
CommCare HQ Style Guide
<fieldset> <legend>Basic Information</legend> <div class="form-group"> ... the attribute css_class to specify custom css-classes to the field, like so:
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found