You can easily add asterisk (*) to the required field in bootstrap form fields. Add the below CSS to your page.
CSS:
Demo
CSS:
.form-group.required .control-label:afterThen add an additional 'required' class to the 'form-group' class.
{
content:"*";
color:red;
}
<form>final code and demo is here
<div class="form-group required">
<label class="control-label">Username</label>
<input type="text" name="userName"/>
</div>
</form>
Demo
No comments:
Post a Comment