[SOLVED] Custom "View As" Hyperlink |
8/25/2011 12:34:13 PM |
PHPRunner General questions | |
![]() Hi all, having links to my view page from outside sources is important to the application I'm building. I was able to change the primary key value of a table so it appears as a link on the list and view pages using the visual editor (hyperlink, URL prefix, display field content = [select primary key field]). $value = "<a href=ACTOR_view.php?editid1=".$data["ACTOR_ID"].">".$data["ACTOR_ID"]."<a/>";
|
|
C
|
cgphp 8/25/2011 |
$value = "<a href=\"ACTOR_view.php?editid1=".urlencode($data["ACTOR_ID"])."\">".$data["ACTOR_ID"]."<a/>"; |
![]() |
mcebula author 8/25/2011 |
Thanks Cristian! |
![]() |
mcebula author 8/25/2011 |
Whoops I just noticed something strange. On the view and edit page now, the header at top of page is messed up showing HTML. |
C
|
cgphp 8/26/2011 |
Try the rawurlencode function instead. |
![]() |
mcebula author 8/29/2011 |
Changing to rawurlencode does change to the %20 delimiter but I still have the top of the form messed up on both the edit & view screens showing with HTML embedded. It's both the new custom link and the existing PHPRunner view (from magnifying glass icon).. $value = "<a href=\"ACTOR_view.php?editid1=".rawurlencode($data["ACTOR_ID"])."\">".$data["ACTOR_ID"]."<a/>";
|
C
|
cgphp 8/29/2011 |
Ok, I see what you mean. This happens because you have set "View as custom" on the primary id field (ACTOR_ID). SELECT
|
![]() |
mcebula author 8/29/2011 |
Thanks so much Cristian, that was it! |