Picture does not appear on dynamic field

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
araquem
User
Posts: 4

Picture does not appear on dynamic field

Post by araquem »

I have a record with the fields id, name and photo.

I have another table of the historical record with the id, cod_nome and photo.

When the historical table I select the table name registration field is filled automatic photo. Everything running cool.

The problem is that the photo is being saved so the file name for the image is going to upload folder. WIth this I can not make the picture appear in the register table visualization historic.

The registration is made standard but I can not view the photo in the listing as this is coming from the member table and comanho is not saved in the database.


mobhar
User
Posts: 11905

Post by mobhar »

Do you save the filename of the photo to "photo" field? Or, is "photo" field a string field type?

If so, you can display the picture by using "Row_Rendered" server event. For example:

// assume the uploaded files are located under the /upload sub-folder:
$this->photo->ViewValue = "<img src='/upload/".$this->photo->ViewValue ."' ";

If the field type supports for saving the picture (such as BLOB), then please refer to the demo project. See "cars" and "cars2" table.


araquem
User
Posts: 4

Post by araquem »

So I have a name field that stores a photo with the string value that is the file name of the photo example foto.jpg

I need to select the field name of my records appear in the photo field picture that is dynamically loaded.

This is already happening but it shows only the file name and must show the picture in picture form.

I inserted the code you gave me but still it only shows the file name.

Recalling need that time registering a new record.


mobhar
User
Posts: 11905

Post by mobhar »

Try this:

$this->name->ViewValue = "<img src='/upload/".$this->name->ViewValue ."'>";


araquem
User
Posts: 4

Post by araquem »

Still did not work.

On the screen listing the path looks like this photo

test /% 3Cimg% 20src = '/ fotomembro / Desert.jpg'% 3

And the registration screen that is where I need to load the image only loads the file name


araquem
User
Posts: 4

Post by araquem »

I showed in the listing that way

$ this-> picture-> ViewValue = "fotomembro /". $ this-> picture-> ViewValue. "";

Now I need to show on the page to add.

The form to add the field name and photo comes loaded from another table.

When I select the name field carries the picture with the filename.

Need instead of the file name, show the image.


Post Reply