A field for Symphony CMS that enforces uniqueness
Clone the latest version to your /extensions
folder and run composer to install required packaged with
$ git clone https://github.com/pointybeard/symext-field-unique-input.git field_uniquetextinput
$ composer update -vv --profile -d ./field_uniquetextinput
After finishing the steps above, enable "Section Model Builder" though the administration interface or, if using Orchestra, with bin/extension enable field_uniquetextinput
.
- Add the following extension defintion to your
.orchestra/build.json
file in the"extensions"
block:
{
"name": "field_uniquetextinput",
"repository": {
"url": "https://github.com/pointybeard/symext-field-unique-input.git"
}
}
- Run the following command to rebuild your Extensions
$ bin/orchestra build \
--skip-import-sections \
--database-skip-import-data \
--database-skip-import-structure \
--skip-create-author \
--skip-seeders \
--skip-git-reset \
--skip-composer \
--skip-postbuild
- This extension works with PHP 7.4 or above.
This extension depends on the following Composer libraries:
Enable this field via the interface and add it to your sections like any other field.
This field behaves identically to a standard text input field, however, it enforces uniqueness of the handle. Note, output in Data Sources cannot be grouped by a Unique Text Input field.
There are two (2) modes which allow the choice between throwing an error, e.g. "This must be unique", or maintain uniqueness by automatically by appending a number to the handle value, eg. my-entry-handle-2
.
If you believe you have found a bug, please report it using the GitHub issue tracker, or better yet, fork the library and submit a pull request.
We encourage you to contribute to this project. Please check out the Contributing to this project documentation for guidelines about how to get involved.
- Alannah Kearney - http://github.com/pointybeard
- See also the list of contributors who participated in this project
"Unique Text Input Field for Symphony CMS" is released under the MIT License. See LICENCE for details.