https://github.com/igorbiki/uw_cta
Drupal 8 new field type, field formatter and field widget. Using link field as parent.
https://github.com/igorbiki/uw_cta
drupal-8 drupal-8-field-plugin drupal-8-fieldtype drupal-8-module
Last synced: about 1 month ago
JSON representation
Drupal 8 new field type, field formatter and field widget. Using link field as parent.
- Host: GitHub
- URL: https://github.com/igorbiki/uw_cta
- Owner: igorbiki
- Created: 2020-02-12T13:40:02.000Z (over 6 years ago)
- Default Branch: 8.x-1.x
- Last Pushed: 2020-02-13T22:30:25.000Z (over 6 years ago)
- Last Synced: 2025-11-15T19:29:44.478Z (7 months ago)
- Topics: drupal-8, drupal-8-field-plugin, drupal-8-fieldtype, drupal-8-module
- Language: PHP
- Size: 4.88 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Drupal module example: uw_cta
Creating new field type, with new formatter and widget. Using link field as parent (extending link field class).
Adding folowing field columns:
* cta_type - varchar(255) - uses select field on add/edit form.
* cta_theme - varchar(255) - uses select field on add/edit form.
* cta_description - text(normal) - uses textfield add/edit form.
Formatter uses simple markup to display all field properties.
Widget - defines html elements how add/edit form displays fields.
# How to use this
This is a Drupal module, to install clone this repo to /modules or /modules/custom folder inside your Drupal. Enable it using drush or UI. Once enabled it will add new field type. Try adding new field type called *UW CTA field* from the list of available fields. On display form and display tabs, there are formatter and widget for this new field.
Drupal version used: 8.8.2
## To do
* Add field template