Page 1 of 1

How to display a image on a form

Posted: 08 Oct 2014
by Gerald Marxer
i have the url of an imge in a "url field".

On the display form i want to show this image as a thubnail picture.

There is no picture control.

How can a accomplish this ? May with the html control ?

Re: How to display a image on a form

Posted: 09 Oct 2014
by Dmitry Kozlov
Hi Gerald,

You can either switch "Format URL as" property in Picture in the column settings or drop HTML control onto the form, set CDATA property in False and put the following code into its Content property:

<img src="{@Hyperlink}" width="100" height="100" />

Please, replace Hyperlink with the internal name of your URL field.

Re: How to display a image on a form

Posted: 08 Apr 2015
by Phoenix
How can i dynamically change the image based on a onchang handler?

Re: How to display a image on a form

Posted: 09 Apr 2015
by Dmitry Kozlov
Hi,

Please, assign an ID to the IMG tag:

Code: Select all

<img id="my-img" src="image1,jpg" width="100" height="100" />
Next, change src attribute via JavaScript:

Code: Select all

$('#my-img').attr('src', 'image2.jpg');