Reputation: 2025
I am using bootstrap tags input https://bootstrap-tagsinput.github.io/bootstrap-tagsinput/examples/ and implemented as well successfully. I just want to made it required field so that each user submit form with the technology tags.
<div class="col-lg-6">
<label class="">Primary Skills (Note: Add comma separated) <span class="text-danger">*</span></label>
<input class="form-control" type="text" id="primaryskill" name="seeker_primary_skills" required>
<b class="tooltip tooltip-top-right">This is a required</b>
</div>
Here is the screenshot for this.
Upvotes: 1
Views: 1432
Reputation: 169
check return on form submit
<form onsubmit="return checktag()">
Javascript/Jquery Code
function checktag(){
if($("#primaryskill").val() == ''){
alert("Tags Required"); //Here you can simple alert or change input css with
border red with msg with the help of jquery
return false;
}else{
return true;
}
}
Upvotes: -1