This topic is locked

Get the "editid" value in a code snippet in the list page

8/25/2010 1:49:35 PM
PHPRunner General questions
C
ced author

Hi,
In the list page of the visual editor, I added a new column near the "Edit" column.

In this new column I want to link to the edit page of another custom view of the same table.
The existing "Edit" column has this link format:

[TABLE_NAME]_edit.php?editid1=[ROWID]



My "Edit2" column will have this format:

[CUSTOM_VIEW_NAME]_edit.php?editid1[ROWID]



The "rowid" will be the same for both columns because the second one is a custom view of my table.
The only problem is that I doesn't know how to get the value of "rowid" in my custom code snippet:

echo '<a class=tablelinks href="software_overview_edit.php?editid1='.$value["rowid"]).'">Edit (Lic)</a>';


In the view, edit or add page, it is easy to get this value in a custom code:

postvalue("editid1")



Is there a simple way to get this ID for each rows in my column?

Sergey Kornilov admin 8/25/2010

You cannot do this with code snippet. I recommend to use 'View as' type 'Custom' for this purpose.

http://xlinesoft.com/phprunner/docs/_view_as__settings_custom.htm
Then you can access any field value as $data["FieldName"].