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

Avatar

Avatar

Jean-foxfly

Avatar

Jean-foxfly

Jean-foxfly

28-11-2018

View Entire Topic

Avatar

Avatar

Jean-foxfly

Avatar

Jean-foxfly

Jean-foxfly

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.