This topic is locked

Assigning different properties to same field in different views

7/20/2011 16:11:59
PHPRunner General questions
A
ashipley author

]I am running PHPRuner5.3. When you change a property of a field in one view, like "Add", it changes the property of the field in the "Edit" and "List" view as well.I have some forms linked together, so that the first field, of the second form picks up the session_ID and is set to "Read Omly". I do this to avoid typos from manual entry in the second form. The problem is that whenI do a "List", the field has the same properties, and therefore will not display properly. If I try to change the properties on the "List" page to simple text, the program changes the property of the field in the "Add" and "Edit" forms as well. Is there a way to stop this, or has this been addressed in later versions?

C
cgphp 7/20/2011

You can use alias for fields. Suppose that the SQL query (http://xlinesoft.com/phprunner/docs/sql.htm) is:

SELECT

id,

field_1,

field_2,

field_3

FROM your_table_name


Now, suppose that you want a custom property for the field_2 in the Add page but a different custom property for the same field in the List page. Change the above query like the following:



SELECT

id,

field_1,

field_2,

field_2 as list_field_2,

field_3

FROM your_table_name


Then in the "Choose fields" page (http://xlinesoft.com/phprunner/docs/choose_fields.htm) set field_2 only for the Add page and list_field_2 only for the List page.