Created by scott_euser on 8 June 2016, updated 16 September 2021.The current maintainers are looking for new people to take ownership.Ĭonsidered feature-complete by its maintainers. I believe the configuration storage is not the right place as this would generally be used for 1-off fields added to particular nodes and as such are to do with the state of the site rather than the configuration of the site. Would welcome feedback or ideas on other approaches hereĪt the moment, I am not 100% confident the Key Value store is the best place for this and would appreciate feedback.Put your single use fields into blocks and attach the blocks to nodes to avoid adding the additional fields overhead to every node.Using a different storage engine such as MongoDB.If you want to attach many fields (ie, 100s of fields) to many specific nodesīut don't want your database to grow extensively by doing so, you could use thisĪlternative approaches to avoiding large numbers of field tables could be: Hook_node_form_api_fields_form_alter(), this module does nothing. This module does not add any fields for you and does not provide an interfaceįor you to add fields. The saved data for the fields is made available on the node object It automatically saves theĬontents of those fields using the Drupal 8 Key Value storage (rather thanįields). This module allows you to use a single hook to easily extend the node edit form You would like to control that yourself in your code. Like to have your fields automatically placed in a fieldset for you or whether You canĪdmin/config/content/node_form_api_fields. Under the Configuration section, in the Content authoring settings. You must then implement this module's hook for this module toĪll settings for this module are on the Node Form API Fields configuration page, To install this module, place it in your modules folder and enable it on the All saving and loading of data onto the node object is done automatically. The first screenshot shows a field appearing with just the few lines of code shown in the second screenshot. The saved data for the fields is made available on the node object. It automatically saves the contents of those fields using the Drupal 8 Key Value storage (rather than fields) to avoid a growing database. This module allows you to use a single hook to easily extend the node edit form using any elements from the Form API.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |