Dynamically set image source path/value in AEM form designer | Community
Skip to main content
Firealan
New Participant
April 27, 2021
Solved

Dynamically set image source path/value in AEM form designer

  • April 27, 2021
  • 2 replies
  • 1568 views

Want to know how to dynamically call  the image source/path on certain conditions in form designer.

Currently I setup [image field] in the document. Wondering how I can use javascript to call / add the image into the image field .

 

I have tried to use the code below on [form:ready] 
this.value["#image"].href = "https://upload.wikimedia.org/wikipedia/commons/thumb/8/8f/SAP-Logo.svg/320px-SAP-Logo.svg.png"

 

But it didnt work.

 

Adobe Experience Manager - forms designer version : 6.5

 

My final goal is using XML data and javascript to dynamically change the path of the image. 

 

Hope someone have a solution/answer  for this question.

Thanks

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Mayank_Gandhi

@firealan  I think you are doing correct just try the b64 string once. 

2 replies

New Participant
May 4, 2021

You cannot change the image path using JavaScript 

Mayank_Gandhi
Mayank_GandhiAccepted solution
Employee
May 4, 2021

@firealan  I think you are doing correct just try the b64 string once. 

Firealan
FirealanAuthor
New Participant
May 4, 2021
thank Mayank . the Base64data work. this.value["#image"].value = "BASE64DATA"