Tag inputs describe 1:n relationship associations in a single multi-select text input.
Whenever no record could be found based on the entered text, a new instance of sourceModel will be created upon saving. For remote data sources any GreenLight list page url could be used as in ajax mode these pages return data in json format.
This input uses Selectize.
Parameter name | Description |
---|---|
remoteUrl | Url to fetch data from, it is recommended to use GreenLight list page url's |
field | Field name of sourceModel to be used for searching, creating and rendering |
sourceModel | Class name of the model used to select from |
pivotModel | Class name describing the association (connection between the current model and sourceModel) |
Tag field connecting the current model (Media) to Tag model instances using the MediaTag pivot model:
(media.yaml)
tags:
type: tag
name: Tagek
parameters:
remote_url: /admin/tags
sourceModel: Tag
pivotModel: MediaTag
field: title