In iPaaS, with Forms, is there yet a way to dynamically show / change images?
I think the answer is no, but with iPaaS forms, we can add images to a form, but they're static. Is there a way I could take an image that might be attached to an object, like an asset, and show that image in line on the form? From what I've tried, I can't modify the image URL when I add an image element to a form.
Answers (3)
Hello Jason,
What you could do is:
- Create a label and set the text of the label to the HTML of an image (e.g., the label would be like
<img src="http://crouton.net/my/image.jpg" style="width: 500px;">
etc - based on what the form does, change the LABEL text to the HTML for another image (e.g., when a form returns something, use a Condition to change the label to
<img src="http://differentpage.com/my/other-image.png" style="width: 500px;">
You just have to pass the source of the image and return the <img src="http://differentpage.com/my/other-image.png" style="width: 500px;">
With that HTML and CSS - you could make an HTML template, and then change that with Javascript.
Another approach is to use Actions, i.e. when you click a button, the Action is to set the Hidden property of an element to false/true.
The answer is yes. Any field can have the "hidden" attribute set through a Condition. If the expression (or flow) returns true, then the element is hidden. For example, if the value of a switch is set to true, then the expression sets hidden=true and the image disappears.
For example, I have a form with an Emergency Change toggle. When that is on/true, then another form element is hidden by setting its "hidden" attribute to true.
You can use this approach on fields and containers to do a progressive reveal of options.
Basically, I'm building a consumables item shopping cart using an Asset app specific to consumables and I was hoping to show an image of an asset (that was added as an attachment to the asset in the app) in-line on the form when an asset was selected, but the image wouldn't be pre-uploaded into iPaaS, it would be accessed either via URL or some other manner. - Jason Pelletier Thu 10/27/22 4:21 PM