Pre-defined AEM form | Community
Skip to main content
October 16, 2015
Solved

Pre-defined AEM form

  • October 16, 2015
  • 4 replies
  • 1158 views

Hi,

I am trying to create a form with validations. I chose the out of the box AEM form component. I am able to achieve validations using custom validators. Also I have written custom action.

The problem is, every time I need this form, I have to drag and drop the form components. I cannot have predefined reusable form. All form related components mandate that they are supposed to be used under a parsys. This is really limiting the re-usability of the form components. To solve this problem I need to take one of the following ways :

  1. Create a template and parsys and form components in the template. Use this template to create pages and get the predefined form. This has a disadvantage. This is still not a reusable component but a standalone template and cannot be used in conjunction with other components.
  2. Dynamically add components to parsys ? Can anyone please shed some light on this ?
  3. Create a custom parsys extending the existing one to add some form components by default ? Can this be done ? If yes how ?
This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by pvo008

I am able to achieve the solution with the procedure mentioned in 

http://versatileankur.blogspot.in/2014/11/component-with-default-components-in-cq5.html

 

Thanks All.

4 replies

smacdonald2008
October 16, 2015

Personally - I would develop this form component and add it to the sidekick so an author can drag it from the sidekick to a web page during design time. That is best practice when using AEM. 

kautuk_sahni
Community Manager
Community Manager
October 16, 2015

Hi pvo008

Option1

There is a concept of Pre-loading form Values. If this could help you.

Link:- https://docs.adobe.com/docs/en/cq/5-6-1/developing/developing-forms.html#Preloading Form Values

 

Option2

Stackoverflow :- Reusing Forms

Link:- http://stackoverflow.com/questions/20879342/reusing-the-cq5-form-into-the-mywebsite-components-is-not-showing-up-the-end-of

 

Option3

Adaotive forms.  Here we can use XML schema of existing form to create new form.

Link:- https://helpx.adobe.com/aem-forms/6/creating-adaptive-form.html

 

I hope this would help you.

 

Thanks and Regards

Kautuk Sahni

Kautuk Sahni
pvo008AuthorAccepted solution
October 16, 2015

I am able to achieve the solution with the procedure mentioned in 

http://versatileankur.blogspot.in/2014/11/component-with-default-components-in-cq5.html

 

Thanks All.

smacdonald2008
October 16, 2015

AEM components are dragged from the side kick onto a web page during design time by AEM authors.

This use case should not be considered an issue as the product was designed this way. 

However - you can place default components in parsys:

http://blogs.adobe.com/experiencedelivers/experience-management/default-components-in-your-parsys/