Expand my Community achievements bar.

How guideBridge build data from a component ?

Avatar

Level 2

Hello, 

I developed a new Appointment component which is a combination of { Calendar + DropDown + Radio group }. May I know how does guideBridge derives the properties of this component on an Adaptive form.


For Example : Currently the component's validation (or) value properties are only considering the "Calendar's" section of the component (may be since I developed this component based on the existing Calendar component.) So how can I make the guideBridge object maintain the data of this component as 

1. Value : to be a combination of all three widget.

2. Validation : to be considered as valid only when all 3 widgets are filled.

1 Reply

Avatar

Level 3

An easy way to do this is to have a panel with following components - date, dropdown, radio button group and a hidden text field. Now you can write a rule by which you compute the combination (of date, dropdown and radio button group, on value change of any date, dropdown & radio button group) to be set as value of hidden field.
Above doesn't require any customization. In case you need to use same in multiple forms, you can also create a fragment for this and re-use it across forms.
The way you are approaching is by creating a new custom component, this is also feasible, but then you need to implement the functions of widget you are extending, like[1]. For creating custom component you can refer[2]
[1] https://experienceleague.adobe.com/docs/experience-manager-65/forms/customize-aem-forms/custom-appea...
[2] https://www.aemforms.training/content/dam/sandbox/a-adaptive-forms/Custom-Adaptive-Form-Components.p...