Click here to Skip to main content
15,887,746 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have this code:
<label for="select-gear">Gear:</label>
					<select id="select-gear" class="demo-default" placeholder="Select gear...">
						<option value="">Select gear...</option>
							<option value="skis">Skis</option>
							<option value="skins">Skins</option>
							<option value="poles">Poles</option>
							<option value="test">Test</option>
            </select>

$('#select-gear').selectize({
  showAddOptionOnCreate: false,
      create: true,
      createOnBlur: true,
      persist: false
});

and I need when I type anything in the input that is not available in the list, to be saved as a value of the input, without creating an item in the list. In short, I need to hide/remove created items from appearing in the list. How can I do this?

What I have tried:

Here is the fiddle:
Edit fiddle - JSFiddle - Code Playground[^]
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900