This topic is locked

EDIT PAGE: Read only field issue

4/13/2009 6:24:28 AM
PHPRunner General questions
L
Lisa2006 author

Hi Forum,
I have set up my field 'user_status' via Visual Editor as follows on the Edit page:
Custom View as:

global $data;

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

$value = "<img src=/myimages/images/success.gif>";
=="no")

$value = "<img src=/myimages/images/fail.gif>";
Edit As:

Read Only
When i load the edit.php page it simply displays <img src=/myimages/images/success.gif>
This code works perfectly well with list, view & print pages. I assume is has something to do with the readonly fields or edit page.
Your help would be much appreciated.
Lisa

J
Jane 4/13/2009

Hi,
thank you for pointing me to this bug.

We'll fix it in the next update.
To make your pages working open generated ..._edit.php file, find this code:

$readonlyfields["FieldName"] = htmlspecialchars(GetData($data,"FieldName", "Custom"));



and replace it with this one:

$readonlyfields["FieldName"] = GetData($data,"FieldName", "Custom");