Skip to content

add Autocomplete option and integrate with SingleLineText field#2819

Open
dezeweetjeniet wants to merge 2 commits into
verbb:craft-5from
dezeweetjeniet:craft-5
Open

add Autocomplete option and integrate with SingleLineText field#2819
dezeweetjeniet wants to merge 2 commits into
verbb:craft-5from
dezeweetjeniet:craft-5

Conversation

@dezeweetjeniet
Copy link
Copy Markdown

No description provided.

@engram-design
Copy link
Copy Markdown
Member

Thanks for putting this together. I can see value in having this available as a dropdown as you've pitched. Currently you can add this as Input Attributes, but its free-form text.

My only comment would be adding an event to this to allow modification of options - similar to the Name field Prefix options for example.

@dezeweetjeniet
Copy link
Copy Markdown
Author

@engram-design Good call, I’ve added an event to allow modifying the Autocomplete dropdown options.
You can now hook into Autocomplete::EVENT_MODIFY_AUTOCOMPLETE_OPTIONS and adjust $event->options as needed.
Docs updated with an example as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants