Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

Where "Document Form" & "Form" variables should be used?

Avatar

Level 2

Hai all,

Could anyone explain me, what is the use of "Document Form" & "Form" variable?

And, in which cases they are used?

Even after going through the Workbench's Help Document, I could not understand much...

Everywhere, I could see only the "xfaForm" variable is used..

Aswani.

1 Accepted Solution

Avatar

Correct answer by
Level 10

So, if a "Document Form" variable is used instead of "xfaForm", will the form be rendered in the same manner?

Yes. The only difference between the two is the content you can put in the variables. If you want to submit the entire PDF then you have to use a Document Form.

If you just want to submit the data (xml), then you can use xfaForm or Document Form. I would suggest to use xfaForm, since it's easier to use xPath to get the  the data element you may need. If you use Document Form, you might have to cast the content of the Document Form into a xml variable before you can use xPath. So it involves an extra step.

Jasmin

View solution in original post

8 Replies

Avatar

Level 2

Thanks Scott..

Now I could understand.. So, if a "Document Form" variable is used instead of "xfaForm", will the form be rendered in the same manner?

Or will there be any difference in viewing the rendered form?

Also, cant we use any other variables to render a Form Guide, other than Form, DocumentForm & xfaForm variables?

Aswani.

Avatar

Correct answer by
Level 10

So, if a "Document Form" variable is used instead of "xfaForm", will the form be rendered in the same manner?

Yes. The only difference between the two is the content you can put in the variables. If you want to submit the entire PDF then you have to use a Document Form.

If you just want to submit the data (xml), then you can use xfaForm or Document Form. I would suggest to use xfaForm, since it's easier to use xPath to get the  the data element you may need. If you use Document Form, you might have to cast the content of the Document Form into a xml variable before you can use xPath. So it involves an extra step.

Jasmin

Avatar

Level 8

Regarding "Also, cant we use any other variables to render a Form Guide, other than Form, DocumentForm & xfaForm variables?"

The properites of  xfaForm or Document Form variables enable you to use Form Guides (and other forms) in conjunction with existing render and submit services, as well as the User service, to create tasks for Workspace ES users. These variables make task generation much easier.

Ultimately, you are using the Forms service to render the Form Guide. If you are only rendering the Form Guide and not creating a user task, you can use the RenderFormGuide operation directly. Look at the input properties of the operation to get clues about the variable types that you need:  http://livedocs.adobe.com/livecycle/8.2/wb_help/000612.html

hope that helps

scott

Avatar

Level 2

Thanks Jasmin...

For your explanation..

Aswani.

Avatar

Level 2

Scott..

Thanks.. for your reply post..

But Scott.. as per your words,

"Ultimately, you are using the Forms service to render the Form Guide.

If you are only rendering the Form Guide and not creating a user task, you can use the RenderFormGuide operation directly"...

So, if I am rendering the Form Guide and creating an User Task as well, then which is the operation that I need to use?

Aswani.

Avatar

Level 8

It takes some getting used to, for sure.

  • You use the xfaForm or Document Form variable to represent a form, and specify which render and submit services you use with the form.
  • You use the User service's Assign Task operation to create the task.
  • You use the Form Data Mappings properties of the Assign Task operation to specify which xfaForm or Document Form variable to use for the task.

The User service works in conjuction with the xfaForm and Document Form variables so that forms are rendered for use in Workspace ES.

Makes sense?