lukasbableck / contao-more-backend-widgets-bundle
This bundle adds backend widgets/inputTypes which can for example be used in other extensions or in RockSolid Custom Elements.
Fund package maintenance!
lukasbableck
Installs: 104
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Type:contao-bundle
pkg:composer/lukasbableck/contao-more-backend-widgets-bundle
Requires
- php: ^8.1
- contao/core-bundle: ^5.3
Requires (Dev)
- contao/manager-plugin: ^2.0
- friendsofphp/php-cs-fixer: ^3.57
Conflicts
- contao/manager-plugin: <2.0 || >=3.0
README
This bundle adds backend widgets/inputTypes which can for example be used in other extensions or in RockSolid Custom Elements.
Currently the following widgets are available:
- charPicker
- color
- number
- range
Usage
...
'inputType' => 'number' // or any other widget from the above
...
Widgets
charPicker
This is used by lukasbableck/contao-title-description-bundle.
It is intended to be used in combination with a JS script and wont do anything on its own.
The widget is not designed to save any value in the database.
color
Adds a color picker widget with both a normal text input and a color input.
It's recommended to use 'rgxp' => 'color' and 'isHexColor' => true for fields with this inputType.
Aside from the color regexp, this bundle also adds colorHex, colorHexRGB and colorHexRGBA regexps.
number
Supports min and max attributes via eval.minval/eval.maxval and step via eval.step.
range
Supports min and max attributes via eval.minval/eval.maxval and step via eval.step.
Regular expressions
color
Expects a color in the format RRGGBB, where RR, GG and BB are hexadecimal values between 00 and FF.
This regexp is intended to be used in combination with the color inputType.
colorHex
Expects a color in the format #RGB, #RRGGBB, #RGBA or #RRGGBBAA, where R, G, B and A are hexadecimal values between 0 and F.
colorHexRGB
Expects a color in the format #RGB or #RRGGBB, where R, G and B are hexadecimal values between 0 and F.
colorHexRGBA
Expects a color in the format #RGBA or #RRGGBBAA, where R, G, B and A are hexadecimal values between 0 and F.