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 via the delegation pattern, 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
It may be possible to get custom options. Sorry, I can't help you but interested in what you are trying to achieve. I'd appreciate if you could update here if successful. Where can I get that code?
Not sure if it was the best way to do it, but I ended up using sling:hideResource on the ./type field in the authoring dialog, and then adding my own field to the dialog and using delegation to extend the core form options java component.