This topic is locked

show image on view page based on contents of another field.

11/28/2013 2:14:27 PM
PHPRunner General questions
P
psenick author

PHPRunner 6.2 with MySQL
On a view page there is a field that contains the result based of a selection field from the Add/Edit page.

How can I have an image change based on the the value of this field.
For example.
Have a selector with values of square, round, triangle on Add/Edit page.
On the view page, if the square was selected, then the image placeholder to the right would display a square.

Else If the triangle is selected then the image displayed would be a triangle.
The images are stored in the images directory, ie. images/triangle.png, and so on.

They are not stored in the database.
I would think on the View Events page, the "Before Display" would contain this code, but I am not sure.
This is probably very basic but can't figure it out.
Thanks in advance for any direction.
Paul