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

how to dynamically change a image in AEM forms workflow step?

Avatar

Avatar
Validate 1
Level 2
Jean-foxfly
Level 2

Likes

13 likes

Total Posts

18 posts

Correct Reply

3 solutions
Top badges earned
Validate 1
Give Back 3
Give Back
Boost 5
Boost 3
View profile

Avatar
Validate 1
Level 2
Jean-foxfly
Level 2

Likes

13 likes

Total Posts

18 posts

Correct Reply

3 solutions
Top badges earned
Validate 1
Give Back 3
Give Back
Boost 5
Boost 3
View profile
Jean-foxfly
Level 2

28-11-2018

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Validate 1
Level 2
Jean-foxfly
Level 2

Likes

13 likes

Total Posts

18 posts

Correct Reply

3 solutions
Top badges earned
Validate 1
Give Back 3
Give Back
Boost 5
Boost 3
View profile

Avatar
Validate 1
Level 2
Jean-foxfly
Level 2

Likes

13 likes

Total Posts

18 posts

Correct Reply

3 solutions
Top badges earned
Validate 1
Give Back 3
Give Back
Boost 5
Boost 3
View profile
Jean-foxfly
Level 2

28-11-2018

Hi workflowuser​, thanks for your response.

Finally I had success in tests. I like to clarify some issues that I found at implementation of your solution.

After give a name for image field in "CSS Class" attribute, I failed in access it by jquery. After a lot of tries and inspect code of html page, I found that the class name was gived to DIV, not for IMG tag. After see this I make a change in jquery and finaly works.  I used this:

CSS Class attribute:  imgCNH  (give a name to field)

jquery code: $(".imgCNH, img").attr("src","/content/dam/foxfly/jean CNH.jpg");

Explanation:

.imgCNH - Select DIV named in by CSS Class atribute

, img - Selet tag IMG below the DV

Thanks a lot for your help. I worked 3 days before your support, and now is solved.

Answers (1)

Answers (1)

Avatar

Avatar
Ignite 5
Employee
workflowuser
Employee

Likes

133 likes

Total Posts

443 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

133 likes

Total Posts

443 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-11-2018

do the following

provide a css class name to the the image component using the properties editor

use this class name to set its src attribute using jquery. In your case the src attribute will be the path where the image is stored

Take a look at the sample "Merge submitted data with acroform"

https://forms.enablementadobe.com/content/samples/samples.html?query=0

In this form you can upload image and that image is shown in the image component.

You can download the code from the  corresponding helpx article