Page 1 of 1

Option Template in List Page

Posted: Mon Jan 08, 2018 3:28 am
by mpol_ch

Hi,

I am using the following code in "Option template" for lookup table and it works good for modal seach:

<span class="text-info">{{:df1}}</span> <small class="text-muted"><img src="files_file_bv.php?Id={{:lf}}" alt="" height="60" width="200"></small>

But it my main table I can not see the image in xxlist.php.
I am using the following code in main table

HREF field: Foto (Id of the BLOB image it is also lookup linked field=
Original field value: checked
Prefix: files_file_bv.php?Id=

What am I doing wrong here?

mpol_ch


Re: show BLOB image by selecting id using dropdown

Posted: Mon Jan 08, 2018 1:33 pm
by arbei

Option template is for Edit Tag only, you need to update the ViewValue as an image tag in Row_Rendered Server Event then try again.

For example:
$this-><Field>->ViewValue = "<img src='files_file_bv.php?Id=" . $this-><Field>->CurrentValue . "'>";


Re: Option Template in List Page

Posted: Mon Jan 08, 2018 5:48 pm
by mpol_ch

Hi,

thank you. I am using the follwing code and it is doing the work.
Could you please advice how to have a pop-up windows onclick event for this image?

if ($this->Foto->ViewValue <> ""){
$this->Foto->ViewValue = "<img src='files_file_bv.php?Id=" . $this->Foto->CurrentValue . "' height='20' width='80'>";
}
else{
}

mpol_ch


Re: Option Template in List Page

Posted: Tue Jan 09, 2018 12:02 pm
by arbei

Add an A tag to the ViewValue, if you need to show the image in color box, add the corresponding class to the control with referencing the other image of the generated files.

For example:
$this-><Field>->ViewValue = "<a class='ewLightbox cboxElement' href='logo.png'><img src='logo.png'></a>";


Re: Option Template in List Page

Posted: Tue Jan 09, 2018 6:57 pm
by mpol_ch

thanks a lot.
It works perfectly with the following code:

if ($this->Foto->ViewValue <> ""){
$this->Foto->ViewValue = "<a class='ewLightbox cboxElement' href='files_file_bv.php?Id=" . $this->Foto->CurrentValue . "'><img src='files_file_bv.php?Id=" . $this->Foto->CurrentValue . "' height='20' width='80'></a>";
}
else{
}

mpol_ch