Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Data source items drag and drop to custom components

Avatar

Level 2

We have built a set of custom Form components that have superResourceTypes of core guide components. 

 

We also have some xdp files that we are using to define the data model. 

 

From the editor left hand panel (Data Sources selected) we would like to be able to drag an item onto the form and for the editor to insert one of our custom components rather than the standard set. For example rather than 

/libs/fd/af/components/guideradiobutton in inserts /apps/ourapp/forms/components/radiobutton

 

I was hoping to find a mapping definition but I cannot find one.

 

Has anyone done something similar?

4 Replies

Avatar

Employee Advisor

@IainClucas Creating custom components and dragging them to the form, Yes, perfectly fine and supported but be careful on how you would handle the data prefill, properties and submit using OOTB actions, to bring custom components in the same component group as forms add componentGroup as Adaptive Form

 

Mayank_Gandhi_0-1668684580381.png

 

Avatar

Level 2

 

All the components we have built are basically slight changes to the core ones, we really only make changes to the widget.jsp file to change the html and add some client specific css classnames. We also have some XSD files that have been created in AEM Designer and we use these as a form data model. Ideally we would like to be able to drag from the data section and create a entry for one of our components rather than the core ones. 

IainClucas_0-1668689080875.png

 

Avatar

Level 2

It does drag a schema field and adds a component to the form with the correct binding etc. What we would like to do is add our custom component not a foundation component. So we have slightly extended some of the core components to include additional html and CSS classes, so when we add a string based schema item we would like our custom Text component to be added rather than the /libs/fd/af/components version.