This topic is locked

text format of read only

5/22/2008 12:21:28 PM
PHPRunner General questions
G
garethp authorDevClub member

Hi
I have formated a field in visual editor (view as) as follows...

$value = "£" . number_format($value,2);

$value = "<font color=gray>".$value."</font>";


and this works perfectly except one place.
I have set this field to read only on edit as, and then when you are on the edit page the following appears where the field is...

<font color=gray>£1.00</font>


The number format appears to be working OK and calculating correctly but the colour/font formatting does not and gives the string as shown before and after then number.
Can you help?
Thanks
Gareth

J
Jane 5/23/2008

Gareth,
I see what you're saying.

You can do the following:

  1. edit SQL query on the Edit SQL query tab.

    Here is a sample:
    select field1,

    field2,

    field2 as field2_edit,

    ...

    from TableName



2. check off field2 on the list and view pages, field2_edit on the edit and add pages on the Choose fields tab.

G
garethp authorDevClub member 5/23/2008

Jane
I can see how the workaround would work. Is there no way of being able to format (colour) read only fields on the edit page?
Would make a big difference to the form.
Thanks
Gareth