Reuse adaptive form fragment multiple times within the same form and prevent duplicate field value? | Community
Skip to main content
New Participant
August 18, 2023
Question

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

  • August 18, 2023
  • 1 reply
  • 676 views

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?

 

 

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

1 reply

Mahedi_Sabuj
New Participant
August 20, 2023

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/creating-forms-repeatable-sections.html?lang=en#using-repeat-settings-of-an-xml-schema-xsd-br 

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-forms-authoring/authoring-adaptive-forms-foundation-components/create-an-adaptive-form-on-forms-cs/adaptive-form-json-schema-form-model.html?lang=en#reusable-schema-definitions 

Mahedi Sabuj
New Participant
August 25, 2023

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.