Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/n2ref/coreui-form-field-select2


https://github.com/n2ref/coreui-form-field-select2

Last synced: 7 days ago
JSON representation

Awesome Lists containing this project

README

        

# Coreui form field select2

[Online documentation](https://n2ref.github.io/coreui-form-field-select2)

[php repository](https://n2ref.github.io/coreui-form-field-php)

### Install

```shell
npm install coreui-form-field-select2
```

### Examples

```html

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');

```