how to create an XDP template and use it with adaptive forms?

ayecona 07-08-2019

so finally I got all the piping done and everything is working as expected. I have my adaptive form that I created from OOTB components and then I submit to a workflow. the workflow takes care of sending an email with the pdf and json file attached. done.

now.... I want to start customizing the look of the form and I understand I can do that with the AEM forms designer where I can create a XDP template to work with.

so.... I imported a pdf form that I had and it gave me all the fields I need as you can see below it actually named the fields on import FirstName for the highlighted field.

1808779_pastedImage_0.png

so this is good so far I then saved it as an XDP file

1808792_pastedImage_1.png

I went to FORMS and upload it the template

1808794_pastedImage_2.png1808795_pastedImage_3.png

so now I have a template of the pdf just like I wanted it to look …. now I need to create an adaptive form with this template as a base. this is where I have my questions.... I create a form choosing a blank template

1808796_pastedImage_4.png1808797_pastedImage_5.png

and I choose the template I created

1808801_pastedImage_6.png

I press enter and then edit

1808802_pastedImage_7.png

and now I don't see the template

1808803_pastedImage_8.png

but then I go to datasources and I see the fields there...

1808804_pastedImage_9.png

please help me understand how the template is used because I thought I would see the way the template looks when I build it.... but how do I use it as a data source?

are there any docs on this or examples I feel I am very close but I need your help thanks

Answers (8)

Answers (8)

ayecona 07-08-2019

workflowuser​ thank you, that was not actually the answer to my question but i learn something new and it give me more possibilities on how to work with AEM forms.

I think I did not explain myself and made the mistake of choosing the template as the Form Data model. which is why it went to the data source. Now I chose the Dynamic CRM data source as the data source and then the template I made as the template for the door and it worked

1808834_pastedImage_0.png

so as a last question on this subject which I am about to try and test:

when creating the custom DOR template and then using it. if I create a field call "txtFirstName" on the template when I go to the adaptive form I actually do not see the fields from the custom DOR and I have to drop new components for the Adaptive form in this case I drop a text field and name it "txtFirstName" I want to know if that is what I am supposed to do. so that it uses the same name as the DOR therefore showing on the pdf. please let me know I am going to try it myself.

ayecona 07-08-2019

workflowuser​ the form is a pdf that I got to test. I assume it was created with acrobat. but as I explained above, it needs to be a template (XDP file) that can be use as the DOR. not an schema. the schema comes from Dynamic CRM.

so how the title says. "how to create an XDP template and use it with adaptive forms?" I need an XDP template that I can use as the DOR.

workflowuser
Employee
07-08-2019

Looks like your form was originally created using acrobat?

if so can you send it to me, I will create schema from that form and then you can use that schema to created your adaptive form and then on submission

we can easily merge the data fwith the template