This topic is locked

Show picture in edit page

3/3/2011 4:31:37 AM
PHPRunner General questions
ncreveld author

I have a database where 20 volunteers are working to digitalize the Dutch and the Hebrew text from 200.000 pictures of gravestones.

I want to give the volunteers the possibility to see the picture in the edit page instead as going every time to the View page to see the picture.

The address of the picture is stored as a text field in the database.

When in edit page I show the picture address as a text field then in view page the picture is showen, the moment I change the picture address field to picture File/Image the image won't show in the view or edit pages any more.

I have been working on this thing for hours but can't find out how to get this working.

The picture address looks like this in the MySql database:

../nik/image/asperen(001)/(1)1.jp

../nik/image/asperen(001)/(1)2.jp

../nik/image/asperen(001)/(1)3.jp and so on ....

Best regards,

Nico Creveld

T
trek46 3/3/2011

What are the fields names you are using? The reason I ask is because the picture would show up unless the field is read-only then the link would appear. I have fixed this by creating a duplicate of the field in question and added some code to update the read-only field such as:



// If SecondFieldName doesn't match FirstFieldName, then change SecondFieldName to match FirstFieldName

if ($values["SecondFieldName"]!=$values["FirstFieldName"])

$values["SecondFieldName "] = ($values["FirstFieldName"]);


Put that in the event "Before Record Updated" and "Before Record Added" and it will make sure to update both fields as needed.



I have a database where 20 volunteers are working to digitalize the Dutch and the Hebrew text from 200.000 pictures of gravestones.

I want to give the volunteers the possibility to see the picture in the edit page instead as going every time to the View page to see the picture.

The address of the picture is stored as a text field in the database.

When in edit page I show the picture address as a text field then in view page the picture is showen, the moment I change the picture address field to picture File/Image the image won't show in the view or edit pages any more.

I have been working on this thing for hours but can't find out how to get this working.

The picture address looks like this in the MySql database:

../nik/image/asperen(001)/(1)1.jp

../nik/image/asperen(001)/(1)2.jp

../nik/image/asperen(001)/(1)3.jp and so on ....

Best regards,

Nico Creveld

ncreveld author 3/4/2011

Thank you with the quick answere, the picture is not read only.

Best regards Nico Creveld



What are the fields names you are using? The reason I ask is because the picture would show up unless the field is read-only then the link would appear. I have fixed this by creating a duplicate of the field in question and added some code to update the read-only field such as:



// If SecondFieldName doesn't match FirstFieldName, then change SecondFieldName to match FirstFieldName

if ($values["SecondFieldName"]!=$values["FirstFieldName"])

$values["SecondFieldName "] = ($values["FirstFieldName"]);


Put that in the event "Before Record Updated" and "Before Record Added" and it will make sure to update both fields as needed.

T
trek46 3/4/2011

I know the field isn't read only. You have to make a duplicate of that field and make the duplicate read-only on the edit page.