This topic is locked
[SOLVED]

 custom icon on list page

6/23/2012 9:33:06 PM
PHPRunner General questions
S
stiven author

Hello everyone,
I am wondering if this is possible and if there is an easy way to achieve this, on the list page there is the edit link with an image i want to add an extra icon with a link to one of the edit pages, the problem here is that i can add the link but i can not get the data from the row my problem here is how to get the data from each row, i need to get the primary key and the name, here is an example.


here is the code i have so far on the html page


{BEGIN edit_link}<A class=runner-button-img title=Edit {$editlink_attrs}><IMG class=runner-cicon alt=Edit src="images/icon_edit_new.gif"></A>{END edit_link}

&nbsp; <A href="general_survey_add.php?c={$PRIMARY_KEY_HERE}&n={$NAME_HERE}"target=_blank class=runner-button-img ><IMG class=runner-cicon alt=Survey src="images/survey.png"></A>


Thanks for the help

J
Jane 6/25/2012

Hi,
you can define these variables in the List page: After record processed event on the Eventstab.

Here is a sample HTML:

{BEGIN edit_link}<A class=runner-button-img title=Edit {$editlink_attrs}><IMG class=runner-cicon alt=Edit src="images/icon_edit_new.gif"></A>{END edit_link}

<A href="general_survey_add.php?c={$custom_PRIMARY_KEY}&n={$custom_NAME}"target=_blank class=runner-button-img ><IMG class=runner-cicon alt=Survey src="images/survey.png"></A>



and sample event code:

$record["custom_PRIMARY_KEY"] = $data["FieldName1"];

$record["custom_NAME"] = $data["FieldName2"];



where FieldName1 and FieldName2 are your actual field names,

S
stiven author 6/25/2012

works perfect! Thanks so much!