So I can setup and use these controls in a form, no problem.
However…how do you reset it ready for its next use?
E.g. if a Select control has e.g
Item1, item2, item3 and the user selects Item2
How do I change the selected item back to Item1 ( so it’s seen as Item1?
At the moment I can set the control to a particular value, but it’s not displayed as such…?
After much trial and error I found a way of doing this…
e.g. if you have a Bootstrap Select Control (Select1) and you choose (e.g.) ‘No’…
then after using the value returned to reset you would do something like this : -
$("#Select1_contents-button .form-control").text("Choose..") Select1.addItem("Choose..", 0, True, False) Select1.addItem("Yes", 1, False, False) Select1.addItem("No", 2, False, False) Select1.addItem("N/A", 3, False, False) Select1.item = 0
The first line has the unintended consequence of clearing the original items, hence the additems after that…but at least this code works…
Tip : If you’re pasting code, html or config files, surround the code with triple back ticks (```), before the first line and after the last one. It will be formatted properly.