Using fragments simplifies and speeds up the creation and maintenance of large numbers of forms. When creating a form, you insert a reference to the required fragment and the fragment appears in the form.
While every form is designed for a specific purpose, there are some common segments in most forms, such as to provide personal details like name and address, family details, income details and so on. Form developers are required to create these common segments every time a new form is created. Adaptive forms provide a convenient mechanism to create form segments like a panel or a group of fields only once and reuse them across adaptive forms. These reusable and standalone segments are called adaptive form fragments. So to create our first adaptive form fragment, I have logged into AEM forms instance and I am going to drill down into the form fragments folder. Here I am going to create a new adaptive form fragment. To give a meaningful title and name to the fragment, I am going to call it spouse details fragment. So here I am going to select spouse details as the name and title and click on create to create the fragment. Open the fragment in the edit mode. So by default every fragment that you create will have a fragment node and under that there will be a guide root panel. So as a best practice, let’s go ahead and add a child panel to the guide root panel. I am going to add a child panel here. And to this panel we are going to add the content of our fragment. So to make things easier.