0

I have a ComboBox using FuelUX, code as below:

<div class="form-group">
    <label for="number_choice">
        1, 2, 3, or 4?<br />
    </label>
    <div class="input-group input-append dropdown combobox" data-initialize="combobox" id="myCombobox">
        <input type="text" name="number_choice" id="number_choice" class="form-control input-lg"
        value="{{ old('number_choice') }}">
        <div class="input-group-btn">
            <button type="button" class="btn btn-default dropdown-toggle btn-lg" data-toggle="dropdown"><span
            class="caret"></span></button>
            <ul class="dropdown-menu dropdown-menu-right">
                <li data-value="1"><a href="#">1</a></li>
                <li data-value="2"><a href="#">2</a></li>
                <li data-value="3"><a href="#">3</a></li>
                <li data-value="4"><a href="#">4</a></li>
                <li data-value="??"><a href="#">Other (let us know in your own words)</a></li>
            </ul>
        </div>
    </div>
</div>

I can't see in the documentation how I can allow for the custom value "Other" where users can specify in their own words, what it is exactly they want.

Michael
  • 4,282
  • 9
  • 55
  • 89

1 Answers1

0

The following should work. changed will fire on blur/deselect.

$('#myCombobox').on('changed.fu.combobox', function (event, data) {
    var selectedItem = $('#myCombobox').combobox('selectedItem');
});
  • Thank you for your help. Unfortunately that didn't work. I don't think jQuery is finding the right element as the value isn't being updated with the value of textbox. – Michael Aug 11 '15 at 16:43