Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

Form Fields with user properties

Avatar

Avatar
Validate 50
Level 4
francisco_ribei
Level 4

Likes

16 likes

Total Posts

207 posts

Correct Reply

7 solutions
Top badges earned
Validate 50
Validate 25
Validate 10
Validate 1
Boost 5
View profile

Avatar
Validate 50
Level 4
francisco_ribei
Level 4

Likes

16 likes

Total Posts

207 posts

Correct Reply

7 solutions
Top badges earned
Validate 50
Validate 25
Validate 10
Validate 1
Boost 5
View profile
francisco_ribei
Level 4

28-05-2016

Hi,

Is it possible to initialize some of the form fields with properties from the current logged user like email, first name?

I search in the documentation but I didn't find anything about this.

Does anyone has a clue about this?

Thanks

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Ignite 5
Employee
workflowuser
Employee

Likes

136 likes

Total Posts

445 posts

Correct Reply

70 solutions
Top badges earned
Ignite 5
Ignite 3
Ignite 1
Give Back 50
Give Back 5
View profile

Avatar
Ignite 5
Employee
workflowuser
Employee

Likes

136 likes

Total Posts

445 posts

Correct Reply

70 solutions
Top badges earned
Ignite 5
Ignite 3
Ignite 1
Give Back 50
Give Back 5
View profile
workflowuser
Employee

28-05-2016

Search for " prefill service" . This was introduced in 6.2 and is meant to pre-populate form fields based on user login. I think have posted a sample of this on the forum. If not I will post it on monday

Answers (2)

Answers (2)

Avatar

Avatar
Ignite 5
Employee
workflowuser
Employee

Likes

136 likes

Total Posts

445 posts

Correct Reply

70 solutions
Top badges earned
Ignite 5
Ignite 3
Ignite 1
Give Back 50
Give Back 5
View profile

Avatar
Ignite 5
Employee
workflowuser
Employee

Likes

136 likes

Total Posts

445 posts

Correct Reply

70 solutions
Top badges earned
Ignite 5
Ignite 3
Ignite 1
Give Back 50
Give Back 5
View profile
workflowuser
Employee

08-08-2016

Yes, you can use the new feature introduced in AEM Forms 6.2 called Prefill service. It requires you to deploy a OSGI bundle and the bundle will return you an xml containing the logged in user's information

You can view "SchemaForForm.zip" at: https://files.acrobat.com/a/preview/18b3cf39-e685-4906-83a7-ddd1b56010a8
You can view "aemformprefillservice-bundle-1.0-SNAPSHOT.jar" at: https://files.acrobat.com/a/preview/597a722e-d852-4ee4-99bb-7e7b362b394c

Deploy the attached bundle

Make sure all the user profile properties are filled 

create a AF form using the schema

Preview the form

You should see the form being populated with the logged in user profile information

Avatar

Avatar
Validate 50
Level 4
francisco_ribei
Level 4

Likes

16 likes

Total Posts

207 posts

Correct Reply

7 solutions
Top badges earned
Validate 50
Validate 25
Validate 10
Validate 1
Boost 5
View profile

Avatar
Validate 50
Level 4
francisco_ribei
Level 4

Likes

16 likes

Total Posts

207 posts

Correct Reply

7 solutions
Top badges earned
Validate 50
Validate 25
Validate 10
Validate 1
Boost 5
View profile
francisco_ribei
Level 4

29-05-2016