1.0.2 • Published 12 months ago

coreui-form-field-select2 v1.0.2

Weekly downloads
-
License
ISC
Repository
github
Last release
12 months ago

Coreui form field select2

Online documentation

php repository

Install

npm install coreui-form-field-select2

Examples

<div id="single-select"></div>

<script>
    let options = [
        '--',
        'Reactive',
        'Solution',
        'Conglomeration',
        'Algoritm',
        'Holistic',
    ];

    CoreUI.form.create({
        send    : {
            url   : '/path/to/object/1',
            method: 'post'
        },
        record  : {
            select_field: null
        },
        fields  : [
            {
                type: 'select2', name: 'select_field', label: 'Select', width: 250, options: options, select2: {
                    placeholder: 'Choose one thing',
                }
            },
        ],
        onSubmit: function (form, data) {
            alert(JSON.stringify(data));
            return false;
        },
        controls: [
            {type: "submit", content: "Send"},
        ],
    }).render('single-select');
</script>
1.0.2

12 months ago

1.0.1

12 months ago

1.0.0

1 year ago