Closed (works as designed)
Project:
Field Group
Version:
8.x-3.x-dev
Component:
Miscellaneous
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
29 Oct 2017 at 22:24 UTC
Updated:
13 Mar 2019 at 22:14 UTC
Jump to comment: Most recent
Comments
Comment #2
eduardo morales albertiHi @ericmorand, yes, it is posible, you must create a new plugin.
If you need an example of it you can download my module https://www.drupal.org/project/field_group_ajaxified_multipage.
We are working on to improve the module, but you can understand how to register a new field_group type.
In addition in a future we will write an article explaining how to do that step by step.
Comment #3
eric morand commented@EduardoMadrid, thanks a lot! I'll give it a try today.
While you're there, can we remove or disable native groups? I'd like to have only custom groups for my client.
Thanks.
Comment #4
eduardo morales albertiHi @ericmorand, Field groups, are custom fields, so if you want new types of fields you need to define it.
Maybe you can use Field group and other contrib fields as example.
Also the module examples https://www.drupal.org/project/examples have some dummy custom fields.
Here you have some tips to create new fields: https://www.drupal.org/docs/8/creating-custom-modules/creating-a-custom-...
Comment #5
eric morand commented@EduardoMadrid, I wanted to disable the default formatters like Accordion, HTMLElement, Details, etc.
I found a way by creating a plugin that use the same id as the official formatters but declare zero supported contexts:
Not super clean but I couldn't find another way.
Comment #6
nils.destoop commentedThere is a better way. Every plugin type has an alter hook, in the case of fieldgroup it's field_group_formatter_info that can be used as alter hook.
Use that alter hook to remove all default plugins.