This topic is locked
[SOLVED]

 two hyperlink in on field

8/13/2020 6:48:46 AM
PHPRunner General questions
K
kdgsv author

Hallo,
I've a field in my table where I can add multiple hyperlinks from a lookup wizzard.
On the list page the links are shown by comma seperated.
http:// link1,http://link2
I want to have both links seperate selectabel to forward to the individual page.
Is there an easy way to do this or do I need to have an a single field for every link?
Thank you
Matthias

Myr0n 8/13/2020



Hallo,
I've a field in my table where I can add multiple hyperlinks from a lookup wizzard.
On the list page the links are shown by comma seperated.
http:// link1,http://link2
I want to have both links seperate selectabel to forward to the individual page.
Is there an easy way to do this or do I need to have an a single field for every link?
Thank you
Matthias


Go to designer, select your field name, click on View As/Edit As, In View As select, Custom and then copy & paste the next code and change "FIELD_NAME_WITH_LINKS" for your field name.

$value=$data["FIELD_NAME_WITH_LINKS"];

$links_array = explode(',', $value);

$arrlength = count($links_array);

$allLinks = "";

for($x = 0; $x < $arrlength; $x++) {

$lnk = '<a href="'.$links_array[$x].'" target="'.'_blank">'.$links_array[$x].'</a>

';

$allLinks = $allLinks.$lnk;

}

$value = $allLinks;
K
kdgsv author 8/15/2020



Go to designer, select your field name, click on View As/Edit As, In View As select, Custom and then copy & paste the next code and change "FIELD_NAME_WITH_LINKS" for your field name.

$value=$data["FIELD_NAME_WITH_LINKS"];

$links_array = explode(',', $value);

$arrlength = count($links_array);

$allLinks = "";

for($x = 0; $x < $arrlength; $x++) {

$lnk = '<a href="'.$links_array[$x].'" target="'.'_blank">'.$links_array[$x].'</a>

';

$allLinks = $allLinks.$lnk;

}

$value = $allLinks;



Thank you very much!!
Works perfect