This topic is locked

read-only lookup

11/7/2011 11:28:49 AM
PHPRunner General questions
P
pbais author

In the PHP Runner visual editor, I can set a field to edit as 'read-only' or 'lookup'. If I choose 'read-only', the page will display the (auto-increment integer) primary key of the lookup table, and if I set the field as 'lookup', it is editable by definition.
How can I set a field as "non-editable lookup" field in the visual editor?

Sergey Kornilov admin 11/7/2011

You can modify your SQL query to pull the value from joined lookup table and set it up as Readonly field.
Example:

select ID,

make,

Models.Name as ModelName

from Cars

inner join Models on Cars.ModelID = Models.ID


Now setup ModelName as Readonly field. This is it.