Is it possible to add another option type to Core Form Options? | Community
Skip to main content
Level 2
March 3, 2023
Solved

Is it possible to add another option type to Core Form Options?

  • March 3, 2023
  • 1 reply
  • 1024 views

In the AEM Core Form Option component, the authoring dialog has a dropdown for option 'type'.  Out of the box, the available options are 'Checkboxes, Radio buttons, Drop-down, and Multi-select dropdown'.  Is it possible to add a custom option to this list (like a group of buttons)?

 

It is easy enough to change the authoring dialog to offer the option, but the Sling model implements the following Options interface that defines an enum for possible values:  

 

Is it possible to add a custom enum value (like BUTTON_GROUP) without changing the source code? I tried extending the OptionsImpl class, which is the sling model that uses this interface, but I can't override its getType() method that returns the interface's enum Type to return my own enum with the new value

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by SantoshSai

Hi @dms879090 ,

 

AEM Forms Core Component relies on the AEM Sites Core Components IMO, you should follow delegation pattern to customize it. eg . https://github.com/adobe/aem-core-wcm-components/wiki/Delegation-Pattern-for-Sling-Models

https://kiransg.com/2021/11/07/aem-core-component-delegation/

 

Also, I would post this question to community which is dedicated to AEM Forms here: https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager-forms/ct-p/adobe-experience-manager-forms-community

 

Hope that helps!

Regards,

Santosh

1 reply

SantoshSai
Community Advisor
SantoshSaiCommunity AdvisorAccepted solution
Community Advisor
March 3, 2023

Hi @dms879090 ,

 

AEM Forms Core Component relies on the AEM Sites Core Components IMO, you should follow delegation pattern to customize it. eg . https://github.com/adobe/aem-core-wcm-components/wiki/Delegation-Pattern-for-Sling-Models

https://kiransg.com/2021/11/07/aem-core-component-delegation/

 

Also, I would post this question to community which is dedicated to AEM Forms here: https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager-forms/ct-p/adobe-experience-manager-forms-community

 

Hope that helps!

Regards,

Santosh

Santosh Sai