Display field

I want that if the value of a field is “1” show me a picture
if ({extra1} == '1 ') / / Display field
{
sc_field_display ({extra1}, ‘on’) / / display an image
}
else / / Hide field
{
sc_field_display (extra1 {}, ‘off’) / / not show the field
}

Someone could help me.
thanks

Re: Display field

change:

 sc_field_display (extra1 {}, 'off') / / not show the field

to

 sc_field_display ({extra1}, 'off') / / not show the field

Regards,
Scott

Re: Display field

Thanks for your reply, I have changed but still does not work

Re: Display field

Debug your code using Firebug and see if your condition is met. I just noticed your code and and you have a space in your value string:

if ({extra1} == '1 ') // space after the 1

Also see if {extra1} is what you expected.

Regards,
Scott.