Expand my Community achievements bar.

Reuse adaptive form fragment multiple times within the same form and prevent duplicate field value?

Avatar

Level 4

Is there any way to use the same adaptive form fragment multiple times within the same adaptive form and not have the values input into the first instance of the fields filled in subsequent instances of the same fields?

 

We've created a few fragments that we'd like to use several times within the same form.  Unfortunately, when the fields are filled out, the data from the first fragment is copied into all subsequent fragments.  I thought that maybe changing the binding for each instance would fix it but that doesn't seem to matter. Someone suggested that adding a binding within the fragment itself, then adding different bindings within each instance of the fragment in the form would fix the issue, but that hasn't been my experience.  Any ideas?

user01804_0-1692383668071.png

 

user01804_1-1692383668035.png

 

 

2 Replies

Avatar

Community Advisor

Hi @CR17506599, I believe there are two potential solutions to address your concern.

1. Use Adaptive Form Button Component and configure a Rule-Editor to generate an additional instance upon button click. https://experienceleague.adobe.com/docs/experience-manager-65/forms/adaptive-forms-basic-authoring/c... 

Screenshot 2023-08-20 at 4.54.36 PM.png

2. Use Reusable Schema Definitions: Create a schema definition and apply Bind Reference to distinguish individual fields. https://experienceleague.adobe.com/docs/experience-manager-cloud-service/content/forms/adaptive-form... 

Avatar

Level 4

Thank you so much for the information!

 

The first option isn't ideal because we know we need three instances of the same fragment within the form, we don't want the user to have to click a button to add each instance.  

The second suggestion looks like it could work, but it goes against why our organization chose AEM Forms in the first place.  If we can create a fragment via the GUI, why can't we use that fragment multiple times within the same GUI? Creating a schema is going to be outside the skillset of most of our users who are making forms. To me it seems like this is an important feature missing from the product.