Would this be helpful.
Example code for the custom field with a url link to a web page when you click on the text that is displayed in a custom box.
Code for TV Movie, TV Mini Series, TV Series, TV Episode, Video etc ... 
//~TV Series & etc ... ~
curPos := PosFrom('<div class="infobar">', HTML, EndPos);
if curPos > 0 then begin
    curPos := curPos + Length('<div class="infobar">');
	EndPos := PosFrom('-', HTML, curPos);
if (EndPos < 1) OR (EndPos > PosFrom('<span title="', HTML, curPos)) then
	EndPos := PosFrom('<span title="', HTML, curPos);
if (EndPos < 1) OR (EndPos > PosFrom('<time', HTML, curPos)) then
	EndPos := PosFrom('<time', HTML, curPos);
//	TmpStr2 := Trim(Copy(HTML, curPos, endPos - curPos));
	TmpStr2 := RemoveTags(Trim(Copy(HTML, curPos, endPos - curPos)), false);
	TmpStr2 := StringReplace(TmpStr2, '                                                                         -', '', True, True, False);
	TmpStr2 := StringReplace(TmpStr2, '            ', '', True, True, False);
//	if TmpStr2 <> '' then AddCustomFieldValueByName('Tv2', TmpStr2);
if TmpStr2 <> '' then AddCustomFieldValueByName('Tv2', '<link url="' + MovieURL + '">' + TmpStr2 + '</link>');
end;