Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/n2ref/coreui-form-field-select2
https://github.com/n2ref/coreui-form-field-select2
Last synced: 7 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/n2ref/coreui-form-field-select2
- Owner: n2ref
- License: gpl-3.0
- Created: 2024-06-05T20:21:58.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2024-06-22T12:55:53.000Z (5 months ago)
- Last Synced: 2024-09-26T02:18:15.722Z (about 2 months ago)
- Language: JavaScript
- Size: 1.54 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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');```