b-form-group feature to add asterisk to labels
See original GitHub issueIs your feature request related to a problem? Please describe…
A for now <b-form-group label="title">
takes label as string, I would like to add *
after the label.
Describe the solution you’d like
Something like this: <b-form-group :label=" 'Customer Name <span>*</span>' " >
So the span could be styled like making the *
red color.
Describe alternatives you’ve considered
So far I could achieve what I want with giving the group a class like required, and work my way down like:
.form-group.required > label:after {
content: " *";
color: red;
}
Issue Analytics
- State:
- Created 4 years ago
- Comments:9 (3 by maintainers)
Top Results From Across the Web
Indicating form controls as required using asterisks (*) - ADG
It is a common technique to add an asterisk * to a form control's label. Then, somewhere else on the page, for example...
Read more >Form Group | Components - BootstrapVue
Easily add some structure to forms. Its purpose is to pair form controls with a legend or label, and to provide help text...
Read more >Use CSS to automatically add 'required field' asterisk to form ...
Here is a simple "CSS only" trick I created and am using to dynamically add a red asterisk on the labels of required...
Read more >bootstrap vue b-form-group show red asterisk - Helptipsweb
https://github.com/bootstrap-vue/bootstrap-vue/issues/4231#issuecomment-540036573.
Read more >Show Asterisk By Labels for Required Fields on the form.
I would like to display red asterisk after field label. Is there a built in function for this in ASP.NET MVC 5 using...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Oops… had a typo in the example. It should be:
You can use the
label
slot to place HTML (or component) markup in the label (which is why the slot is provided):See https://bootstrap-vue.js.org/docs/components/form-group#comp-ref-b-form-group-slots