Skip to main content

Required Elements

Required element

Html
<div class="control-group">
<form>
<label for="select-beast">Beast:</label>
<select id="select-beast" required class="demo-default"
placeholder="Select a person..." name="beast">
<option value="">Select a person...</option>
<option value="4">Thomas Edison</option>
<option value="1">Nikola</option>
<option value="3">Nikola Tesla</option>
<option value="5">Arnold Schwarzenegger</option>
</select>
<button type="submit">Submit</button>
</form>
</div>
Javascript
$('#select-beast').selectize({
create: true,
sortField: {
field: 'text',
direction: 'asc'
}
});