Module Description
Ever wanted to add some markup to a form display mode or view display mode and found it more difficult than imagined? Rage no more.
You probably already have Field Group installed and you don't want to add another module that will clutter your entities with fully fledged markup fields (of which there are many).
How it works
This module provides a very simple and basic Field Group Formatter that allows you to add processed HTML as markup to your entity form displays.
It started off by using #markup on a field_group_html_element with a div as #wrapper_element, but in order to support WYSIWYG editing and other fancy formatting (no one likes writing raw HTML into a text box) the formatter now supports any text format you like.
All base Field Group settings (like ID, classes, and hiding if empty) are supported.
Now you can inject markup into your entity forms to your heart's content without using hook_form_alter or markup field modules.
It's recommended that you leave "Display element also when empty" checked (it is by default) especially if you don't plan to nest anything inside your markup element.
Future features
There is some basic support for tokens, but more could be done to provide UI support and integrate tokens for the underlying entity: #3309975: Token support to fieldgroup markup text
Right now the module only provides markup that is HTML and wrapped in a div. Some further config options or a second "raw" formatter could be added to remove the wrapper and provide fuller control over the output and wrapper.
Similar modules that use fields rather that fieldgroups as a solution
* Markup - provides a fully-fledged markup field for entities.
* Extra field - provides pseudo-fields for developers
* Markup field - provides a fully-fledged markup field for entities (with CSS/JS)
* Inline formatter field - provides a fully-fledged field with with token / HTML / Twig support and boolean checkbox to enable field output per entity.
You probably already have Field Group installed and you don't want to add another module that will clutter your entities with fully fledged markup fields (of which there are many).
How it works
This module provides a very simple and basic Field Group Formatter that allows you to add processed HTML as markup to your entity form displays.
It started off by using #markup on a field_group_html_element with a div as #wrapper_element, but in order to support WYSIWYG editing and other fancy formatting (no one likes writing raw HTML into a text box) the formatter now supports any text format you like.
All base Field Group settings (like ID, classes, and hiding if empty) are supported.
Now you can inject markup into your entity forms to your heart's content without using hook_form_alter or markup field modules.
It's recommended that you leave "Display element also when empty" checked (it is by default) especially if you don't plan to nest anything inside your markup element.
Future features
There is some basic support for tokens, but more could be done to provide UI support and integrate tokens for the underlying entity: #3309975: Token support to fieldgroup markup text
Right now the module only provides markup that is HTML and wrapped in a div. Some further config options or a second "raw" formatter could be added to remove the wrapper and provide fuller control over the output and wrapper.
Similar modules that use fields rather that fieldgroups as a solution
* Markup - provides a fully-fledged markup field for entities.
* Extra field - provides pseudo-fields for developers
* Markup field - provides a fully-fledged markup field for entities (with CSS/JS)
* Inline formatter field - provides a fully-fledged field with with token / HTML / Twig support and boolean checkbox to enable field output per entity.
Module Link
Project Usage
127
Security Covered
Covered By Security Advisory
Version Available
Production
Module Summary
This module aims to solve the difficulty of adding markup to form display modes or view display modes by providing a simple and basic Field Group Formatter that allows users to inject processed HTML as markup to entity form displays without cluttering entities with fully-fledged markup fields.
Data Name
field_group_markup