Dynamically set image source path/value in AEM form designer

Avatar

Avatar
Establish
Level 1
Firealan
Level 1

Likes

0 likes

Total Posts

6 posts

Correct reply

0 solutions
Top badges earned
Establish
Validate 1
View profile

Avatar
Establish
Level 1
Firealan
Level 1

Likes

0 likes

Total Posts

6 posts

Correct reply

0 solutions
Top badges earned
Establish
Validate 1
View profile
Firealan
Level 1

27-04-2021

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

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Springboard
Level 10
Mayank_Gandhi
Level 10

Likes

327 likes

Total Posts

1,150 posts

Correct reply

185 solutions
Top badges earned
Springboard
Establish
Validate 1
Contributor 2
Ignite 5
View profile

Avatar
Springboard
Level 10
Mayank_Gandhi
Level 10

Likes

327 likes

Total Posts

1,150 posts

Correct reply

185 solutions
Top badges earned
Springboard
Establish
Validate 1
Contributor 2
Ignite 5
View profile
Mayank_Gandhi
Level 10

04-05-2021

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

Answers (1)

Answers (1)

Avatar

Avatar
Ignite 1
Level 7
GirishBedekar
Level 7

Likes

172 likes

Total Posts

241 posts

Correct reply

38 solutions
Top badges earned
Ignite 1
Give Back 5
Give Back 3
Give Back 10
Give Back
View profile

Avatar
Ignite 1
Level 7
GirishBedekar
Level 7

Likes

172 likes

Total Posts

241 posts

Correct reply

38 solutions
Top badges earned
Ignite 1
Give Back 5
Give Back 3
Give Back 10
Give Back
View profile
GirishBedekar
Level 7

04-05-2021

You cannot change the image path using JavaScript