This topic is locked

Checkbox when grouped

8/9/2012 9:09:59 AM
PHPRunner General questions
C
christwigg74 author

Hi guys
I have a problem with the checkbox image being displayed as html code when i set that field as grouped.
I.e <img src="images/check_yes.gif" border=0>
I have tried using the custom code also with:-
if ($value=="yes")

$value = "<img src=\"images/check_yes.gif\">";

else

$value = "<img src=\"images/check_no.gif\">";
But exactly the same result.
Any Idea's
Thanks

P
procheck 8/9/2012

You're missing the brackets ( { ).
if ($value=="yes")

{

$value = "<img src=\"images/check_yes.gif\">";

}

else

{

$value = "<img src=\"images/check_no.gif\">";

}

C
christwigg74 author 8/9/2012

No that didn't work either.
I copied and pasted your code into the custom code and the output is still <img src="images/check_yes.gif"> instead of the image itself

P
procheck 8/9/2012

It looks like your code should have worked the first time. I can't see what the problem is. Maybe someone else can help.
Display image

C
cgphp 8/9/2012

Try to upload your project to the demo server and check if you can reproduce the same issue.

L
laonian 8/9/2012

I assume that you are using this custom code for the list page. If yes, could you try this one?



if ($data["your_field_name"]=="yes")

{

$value = "<img src=\"images/check_yes.gif\">";

}

else

{

$value = "<img src=\"images/check_no.gif\">";

}


Replace your_field_name with actual field name.
Good luck!