Expand my Community achievements bar.

How to insert application form id into the form template

Avatar

Former Community Member
Hi,



Is there a way to set the application form id into a form template designed from the LiveCycle Designer? Here is the detail description of my question:



(1) I am using LiveCycle Design to design a form template.

(2) I go to our application to deploy this form template. During the process, a form id will be generated and it will be associated with this form template.

(3) I would like to insert this generated form id into the form template, so that later when user fills out and submits the form, I will know what's the form id the submitted data belongs to.



Appreciate you kind help!!!
5 Replies

Avatar

Former Community Member
Is the form ID automatically generated by some other application?



--

Justin Klei

Cardinal Solutions Group

www.cardinalsolutions.com

Avatar

Former Community Member
Hi Justin,



Yes. The form ID will be generated by our application during the form deployment process (after the form is designed, it needs to be deployed to our application before it can be used.). So I was hoping there is a way to set the form ID into the form template design at that point. So that later when end user fills out and submits this form, I will know what form ID it is related to.



If I cannot do this at the deployment point, one way I can think of is to do it at the time when end user is downloading the form. I can return a "rendered" form (instead of opening up the form template directly) with the form ID information in it. But that means for every single form user opened we need to render it at run time to fill in the form ID, which is not performing and what I was trying to avoid.



Thanks for your help!

Anita

Avatar

Former Community Member
I don't understand what you are doing in the process to "deploy" your template. None the less....



You can place a TextField in your template named "FormId". Make the FormId TextField "read-only" and "hidden". Set the value of FormId to the form id that was generated. (You can do this manually by opening the form again in Designer, or you can do it programmatically using various tools.) The submitted XML will contain an element named FormId with the expected value.

Avatar

Former Community Member
Hi Brad,



Thanks for your feedback.



To "deploy" my template is our application feature. It's a way for us to manage the available/active form templates in the system. It has nothing to do with Adobe Designer or Forms.



Yes, I would like to use hidden field to store the form id. But I cannot set the form id value during the form design time since the form id is available during the "deployment" time. And the person who deploys the form might be different than the person who designs the form. That is why I am looking for a programmatical way to set the form id into the hidden field at the "deploy" time.



Thanks,

Anita

Avatar

Former Community Member
XPAAJ is a good Java API for setting field values programmatically. It's free from Adobe if you've purchased certain server products. One or more of the LiveCycle server products should allow this as well.