https://github.com/lutsen/template-optionselect
Admin template to use a fixed array of options with the Lagan String property.
https://github.com/lutsen/template-optionselect
lagan
Last synced: 2 months ago
JSON representation
Admin template to use a fixed array of options with the Lagan String property.
- Host: GitHub
- URL: https://github.com/lutsen/template-optionselect
- Owner: lutsen
- License: mit
- Created: 2017-05-31T20:15:52.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-01-29T20:53:52.000Z (over 7 years ago)
- Last Synced: 2024-04-10T06:09:31.397Z (about 1 year ago)
- Topics: lagan
- Language: HTML
- Homepage: https://www.laganphp.com
- Size: 2.93 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
[
](https://github.com/lutsen/lagan)
Lagan Properties Optionselect Template
======================================Admin template to use a fixed array of options with the Lagan String property.
You define options in the properties of a model like this:
```php
'options' => [
'option_a' => [ 'name' => 'Option A' ],
'option_b' => [ 'name' => 'Option B' ]
]
```You can set the validation rule in the String property like this:
```php
'validate' => 'inlist({"list": {"0":"option_a", "1":"option_b"}})'
```To be used with [Lagan](https://github.com/lutsen/lagan). Lagan lets you create flexible content objects with a simple class, and manage them with a web interface.
Lagan is a project of [Lútsen Stellingwerff](http://lutsen.net/).