Radicore Forum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » RADICORE » How To » Passing URLs from _cm_formatData
Passing URLs from _cm_formatData [message #3458] Fri, 08 February 2013 08:54 Go to next message
johnftr is currently offline  johnftr
Messages: 14
Registered: January 2013
Junior Member
I have tried following the example shown in the FAQ on how to create an HTML link within each row in a list.
The code I currently have is as follows:
function _cm_formatData ($rowdata, &$css_array)
// perform custom formatting before values are shown to the user.
{
if (!isset($rowdata['person_name'])) {
// merge rank first_name and last_name into person_name
if (isset($rowdata['firstname']) AND isset($rowdata['lastname'])) {
$rowdata['person_name'] = $rowdata['rank'] . " " . $rowdata['firstname'] . ' ' . $rowdata['lastname'];
$rowdata['hyperlnk'] .= 'http://www.bdnw.org.uk]';
} // if
} // if

return $rowdata;
} // _cm_formatData


The name concatenation works fine, but the url simply appears as [url=www.bdnw.org.uk]in th eoutput screen - not a clickable thing in sight!
Grrrrr.

[Updated on: Fri, 08 February 2013 08:56]

Report message to a moderator

Re: Passing URLs from _cm_formatData [message #3462 is a reply to message #3458] Sat, 09 February 2013 07:03 Go to previous message
AJM is currently offline  AJM
Messages: 2251
Registered: April 2006
Location: Surrey, UK
Senior Member
Did you follow all the instructions in FAQ133 items 4 and 5?

In particular you must have the field's control type set to 'hyperlink' in the $fieldspec array.

There are also two ways to display the hyperlink:
1) As a complete hyperlink, with the field's value containing the hyperlink as in 'http://www.example.com'.
2) As a label, with the fiield's value containing 'label [url=http://www.example.com]'


Previous Topic: Parameters to batch functions / timeout
Next Topic: Question
Goto Forum:
  


Current Time: Tue Aug 03 18:39:46 EDT 2021

Total time taken to generate the page: 0.00971 seconds