Skip to content

Basic Symphony text input field that forces uniqueness

License

Notifications You must be signed in to change notification settings

pointybeard/symext-field-unique-input

Repository files navigation

Unique Text Input Field for Symphony CMS

A field for Symphony CMS that enforces uniqueness

Installation

Clone the latest version to your /extensions folder and run composer to install required packaged with

Manually (git + composer)

$ 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.

With Orchestra

  1. 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"
    }
}
  1. 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

Requirements

  • This extension works with PHP 7.4 or above.

Dependencies

This extension depends on the following Composer libraries:

Usage

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.

Support

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.

Contributing

We encourage you to contribute to this project. Please check out the Contributing to this project documentation for guidelines about how to get involved.

Author

License

"Unique Text Input Field for Symphony CMS" is released under the MIT License. See LICENCE for details.

About

Basic Symphony text input field that forces uniqueness

Resources

License

Security policy

Stars

Watchers

Forks

Packages

No packages published

Languages