Expand my Community achievements bar.

SOLVED

First time with forms

Avatar

Level 3

Hi all,

This is my first time working with AEM Forms. I do understand how the new adaptive forms work but, I have a couple of general questions...

1 - I know how to create a custom action (custom submit button) and a adaptive form template. But if the form is edited and the number/type of fields are unknown. How do we process the posted data in the back-end? Basically, my concern is if the author creates a new form, how do we know the id of each new field to get the parameters from the request?

2 - If we create a form from <host>:<port>/aem/forms.html, we will create a new form page within /content/forms/af/.... Should I create my form pages under /content/myapp/... or it is a good practice to host all the forms within /content/forms/af/myapp/... ???

Any clarification is really appreciated :)

Thanks,

Salva.

1 Accepted Solution

Avatar

Correct answer by
Employee

1. The submit payload has a dataXml payload which is a xml containing all submitted fields. For bound fields (xfa/xsd), the data xml would adhere to schema. Non bound fields are kept in flat hierarchy  in <name_of_field>value</name_of_field> format (implies name be unique for non bounded fields)

2. When you create an AF, there are two nodes created.One is AF (cq page) under /content/form/af , other is kind of book keeping nodes (for forms's meta data) created at /content/dam/formsanddocuments. You don't  have to create a cq page if you use /aem/forms.html UI. However if you want to use an existing CQ page here is how you can do it https://helpx.adobe.com/aem-forms/6/displaying-forms-aem-web-pages.html

 If you want to do any customization to any template/component, it is advised to copy the template/component from /libs to /apps and change whatever you want to. 

View solution in original post

1 Reply

Avatar

Correct answer by
Employee

1. The submit payload has a dataXml payload which is a xml containing all submitted fields. For bound fields (xfa/xsd), the data xml would adhere to schema. Non bound fields are kept in flat hierarchy  in <name_of_field>value</name_of_field> format (implies name be unique for non bounded fields)

2. When you create an AF, there are two nodes created.One is AF (cq page) under /content/form/af , other is kind of book keeping nodes (for forms's meta data) created at /content/dam/formsanddocuments. You don't  have to create a cq page if you use /aem/forms.html UI. However if you want to use an existing CQ page here is how you can do it https://helpx.adobe.com/aem-forms/6/displaying-forms-aem-web-pages.html

 If you want to do any customization to any template/component, it is advised to copy the template/component from /libs to /apps and change whatever you want to.