December 2016
Beginner to intermediate
1005 pages
21h 54m
English
Field widgets provide the form interface for editing a field. These integrate with the Form API to define how a field can be edited and the way in which the data can be formatted before it is saved. Field widgets are chosen and customized through the form display interface.
In this recipe, we will create a widget for the field created in the Creating a custom field type recipe in this chapter. The field widget will provide two text fields for entering the first and last name items.
Create a new module such as the one existing in the first recipe. We will refer to the module as mymodule throughout the recipe. Use your module's appropriate name.
src/Plugin/Field/FieldWidget ...Read now
Unlock full access