- nickbhAsked on September 04, 2015 at 06:25 AM
Is it possible to dynamically change an image on the form (ie its url location)
Ie can I prepopulate a field and reference that field to identify the location of the image.
Ie pass URL location when loading the form?
- JotForm SupportWelvinAnswered on September 04, 2015 at 10:37 AM
Well, for prepopulating a field, that is possible.
For referencing the prepopulated field, you can use our calculation widget. In this case, you need to conditionally do it:
Please share us the form in question so we can check it.
- nickbhAnswered on September 04, 2015 at 11:27 AM
Thanks for the reply. I am familiar with both tutorials.
What I am trying to do is update the image on the form by passing a URL parameter.
Ie, in the middle of the form I have an image of an apple (eg www.myimages.com/apple.jpg).
When I call the form I want to pass a new image location (eg www.myimages.com/orange.jpg) so that the form loads up the Orange image instead of the apple.
What I am asking- is it possible to change the image through a URL parameter?
- nickbhAnswered on September 04, 2015 at 01:01 PM
Alternatively can you include a reference to a field in the image URL?
where textinput_23 is a prepopulated hidden field in the form?
- JotForm SupportWelvinAnswered on September 04, 2015 at 02:43 PM
Unfortunately, I don't think this is possible. I did try looking for a direct method to achieve this in the form, no avail. A workaround would be to add the images in the form and show each based on the previous field data - that is through conditional logic.
Here's example form, http://www.jotformpro.com/form/52463853327964. Type "black" or "orange" in the Image Param field to view the images.
Then you can do the URL parameter:
I hope this works for you.
- nickbhAnswered on September 06, 2015 at 08:12 AM
Thanks for the workaround. Not sure this will work however as I may have over 200+ images and the locations may change on the form depending on another parameter - so I could potentially have to create over 1000 images.
I will have to consider if there is another workaround.
Any other suggestions would be very welcome.
- JotForm SupportjonathanAnswered on September 06, 2015 at 02:14 PM
If I understand correctly, the reason you were trying to come up on this workaround because you were using for a workaround on the pre-populated slider you mentioned on this thread
Hope this help. Let us know if you need further assistance.