How can I make the select form required? I tried putting "required" but it doesn't work.
<div class="form-group">
<label for="sel2">How many years have you been trading *</label>
<select class="form-control" id="sel2" required>
<option>Please select one</option>
<option>Start Up</option>
<option value="1-2">1-3</option>
<option value="3-4">3-4</option>
<option value="5more">5 or more</option>
</select>
</div>
Also for this one, I just got this from a website and I downloaded the zip file but I need to add a required attribute
<div class="form-group">
<label>Country *</label><br>
<div id="basic" data-input-name="country" required></div>
</div>
<script>
$('#basic').flagStrap();
$('#origin').flagStrap({
placeholder: {
value: "",
text: "Country of origin"
}
});
$('#options').flagStrap({
countries: {
"AU": "Australia",
"GB": "United Kingdom",
"US": "United States"
},
buttonSize: "btn-sm",
buttonType: "btn-info",
labelMargin: "10px",
scrollable: false,
scrollableHeight: "350px"
});
$('#advanced').flagStrap({
buttonSize: "btn-lg",
buttonType: "btn-primary",
labelMargin: "20px",
scrollable: false,
scrollableHeight: "350px",
onSelect: function (value, element) {
alert(value);
console.log(element);
}
});
</script>