Expand my Community achievements bar.

Enhance your AEM Assets & Boost Your Development: [AEM Gems | June 19, 2024] Improving the Developer Experience with New APIs and Events

Return Current Username in field

Avatar

Former Community Member

I would like to have the username of the current user show up in a field in a dynamic form. Any ideas?

7 Replies

Avatar

Level 10

I donot think PDF can read the http headers to determine what the user name/ user id is..(Unless any one has any idea)

You might have to pass the user name in the XML at the time of rendering and map a field on the form to that XML tag.

Thanks

Srini

Avatar

Former Community Member

Thanks for the quick response. How would I go about passing the user name to an XML tag?

Avatar

Level 10

How are you currently rendering your Dynamic form for the user?

Thanks

Srini

Avatar

Level 10

If you are creating the dynamic form and save it as a .PDF and then post it on a website for users to download using a link, then you are not rendering the form. It is as good as a stand alone form for the user. It means, the users always will receive the form as blank or with some pre-defined data.

    --- In this scenario, since you are not rendering the form, you are not using any XML for rendering. So you do not have control on the input XML.

If you are generating the form at the run time by using a WorkBench process or with Java APIs then you are rendering the form.

    -- In this scenario, since you are rendering the form, you are using XML and you can control the data in the XML that goes into the form.

Hope this helps.

Thanks

Srini

Avatar

Former Community Member

I see. In other words, my form is not able to generate the username into a field?


Avatar

Level 10

If the form is not a rendered one then that may be correct.

Below link will give you what properties and methods are supported by the xfa.host object.

http://livedocs.adobe.com/livecycle/8.2/acrobat_designer/wwhelp/wwhimpl/common/html/wwhelp.htm?conte...

PS:

There is one other option which I read it in Acrobat forums..Its' using the identity object's properties.

     xfa.host.messageBox("Your name is " + identity.loginName);

But it has some security restrictions.

Please go thru the below discussion and you should find the help on how to use this object.

http://www.acrobatusers.com/forums/aucbb/viewtopic.php?pid=63921

Thanks

Srini