Customize Adaptive Forms Core Components

Customizing Adaptive Forms Core Components allows you to tailor the out-of-the-box functionalities to fit your specific needs. This guide walks you through the process of customizing these components to create a more personalized experience.

TIP
Have you considered Edge Delivery Services for AEM?
You can continue using the methods described in this document for existing projects. However for new projects, Adobe recommends leveraging Edge Delivery Services.

Pre-requisite

Before diving into customizing Adaptive Forms Core Components,

Customize an Adaptive Forms Core Component

Follow the steps below to modify the appearance, behavior, and functionality of an Adaptive Forms Core Component.

  1. Identify and duplicate the Core Component

    While configuring the development environment, you have created an Archetype-based project. In the AEM Archetype Project, identify the specific Core Component you wish to customize. Once identified, create a duplicate of the component within your AEM Archetype based project. Keep it in parallel to other Adaptive Forms Core Components. This step ensures that your customization efforts won’t affect the original component, allowing you to experiment freely.

  2. Customize the Copied Component

    Open the duplicated component and start making the necessary modifications according to your requirements:

    • Customize HTML Structure: Tailor the HTML structure to suit your design needs while adhering to BEM (Block Element Modifier) styling practices for maintainable and scalable code.
    • Update label: Update the label of the component to provide a clear and descriptive name for the customized version. Refer to the provided OOTB (Out of the Box) label template for consistency.
    • Customize Widget: Adjust the widget used within the component (dropdowns, checkboxes) to align with your specific use case. See, the sample widget implementation for reference.
    • Help Text and Tooltips: Personalize the help text or tooltips associated with the component to offer context and guidance to users. Use the OOTB help text template as a starting point.
    • Data Attributes: Incorporate all necessary data attributes within the component’s HTML elements. These attributes are crucial for the proper functioning of the component at runtime. Consult the documentation to understand the role of data attributes in Adaptive Forms Core Components.
  3. Implement Backend Logic

    If your customization requires backend logic, you can extend existing sling models. Refer to the provided example to seamlessly integrate the desired functionality into your customized component.

  4. Configure the Component’s Dialog

    Configure the dialog associated with your customized component. Use the example component dialog provided in the documentation to ensure that user interactions and settings are appropriately managed.

  5. Deploy and test the component on your local development environment

    Use maven to build and deploy the component on your local development environment. After the component is deployed, create an Adaptive Form to test the custom component.

  6. Deploy the custom component on your production environment

    After testing the component on your local development environment, deploy the component on your production environments.

recommendation-more-help
d2be9096-a81e-404b-9952-d8925af7219c