Adding Asterisk mark to Label .

0
I want to add asterisk mark for required field.Is there any way to do that?I want to add asterisk mark for required field.Is there any way to do that?
asked
3 answers
5

After reading your comment, maybe something like this:

I disabled the standard Label of the text field.

Above it I added two separate text widgets.

The top one displays the label for the text field "Name”. I added "float: left;” to the styling.

The bottom text widget contains the asterisk. I added "color: red;” and "font-size: 25px;” to the styling. (Size and color for demonstration purposes, use what you like).

In my app the result is this, could be a little bit different in your application.

answered
3

You could add some css:

.required label.control-label::after {
    content: " *";
}

Then add the .required class to the text box.

 

result: 

 

You can offcourse add more styling like color, or even change the color of the input field itself:

By adding for the code below to your custom.css: 

.required .form-control {
  background-color: beige;
}
 

answered
0

Well, if you edit the properties of the text field you can toggle the Show Label option. When its on 'Yes' you can edit the Label caption. Simply ad a '*' to the end of the caption. I don't believe there is a way to do this automatically when making a field required.

answered