How to set "addon" of bs3 with "chhib:selectize-bootstrap-3" in autoform custom field?


#1

I want to set addon of bs3 with chhib:selectize-bootstrap-3 in autoform custom field like this

<div class="form-group{{#if afFieldIsInvalid name='staffId'}} has-error{{/if}}"
                     data-required="true">
                    <label class="control-label" for="staffId">Staff</label>

                    <div class="input-group">
                        {{> afFieldInput name='staffId'}}
                        <span class="input-group-addon staffInsertAddon">
                            <a href="#">
                                <i class="fa fa-plus"></i>
                            </a>
                        </span>
                    </div>
                    {{#if afFieldIsInvalid name='staffId'}}
                        <span class="help-block">{{afFieldMessage name='staffId'}}</span>
                    {{/if}}
                </div>

But not work, please help me.


#2

What kind of field is the staffId field input?

I’ve used the afFieldValueIs helper and I know there’s a major issue with checkboxes and afFieldIsXXX helpers.


#3

In SimpleSchema

studentId: {
        type: String,
        autoform: {
            type: "selectize",
            options: function () {
                return List.student();
            }
        }
    },