I have a requirement, There are multiple vendors ( around 100 and its increasing ) and each vendors a unique combinations of form fields should populate.
Basically in the dispatcher the vendors are getting selected from dropdown and then based on each vendor the form fields will vary . These data (Vendor information and related information ) should get from backend while selecting from the dropdown (the dropdown of vendor selection).
My concern is how can I map the response from the backend to the component for different combination of form fields based on the selected dropdown (Vendor). The order of the form fields may vary based on the selected vendor. So its dynamic
Instance :AEMasCS , Not Using adaptive forms only core component forms .
Thanks,
Solved! Go to Solution.
Topics help categorize Community content and increase your ability to discover relevant content.
Views
Replies
Total Likes
You could have vendor specific forms created using selectors that are displayed when the dropdown values change. This method might mean less calls to Publisher but you would need a service that could generate those forms and then cache.
Implementation would vary on how complex your forms are and how much variation in forms is needed per request. If there are several updates based on a request, could be a servlet call on dropdown value change, that accesses a service that would return the vendor specific fields. You can save them in a config with a vendor mapping of fields with name, label, type etc. This obviously means more publisher calls, so the best way to go about is think how static or dynamic these forms are and then look for a solution.
You could have vendor specific forms created using selectors that are displayed when the dropdown values change. This method might mean less calls to Publisher but you would need a service that could generate those forms and then cache.
Implementation would vary on how complex your forms are and how much variation in forms is needed per request. If there are several updates based on a request, could be a servlet call on dropdown value change, that accesses a service that would return the vendor specific fields. You can save them in a config with a vendor mapping of fields with name, label, type etc. This obviously means more publisher calls, so the best way to go about is think how static or dynamic these forms are and then look for a solution.
Hi @Learning4me ,
You can try the following approach
Backend Integration:
Frontend Component Mapping in AEM:
You can also use Content Fragment Model for creating the dynamic form structures. CFMs allow you to define structured content types (similar to field definitions) and reuse them across different components. You can create a CFM for each vendor type and associate it with your custom component.
Thanks,
Madhur