Hi,
I have a collection in a LF Forms which populates entry ID for a laserfiche document based on a Single Field look up value. I would like the entry id to be append to a custom html to create a link for weblink.
I have the code below. the code works but the link only points to the first collection row. I would like the link to show and append on each row as I have multiple rows. I am little puzzled about using indexing on the target html field.
Can someone help me with this?
Appreciate your help.
$(document).on('blug change', '.InvEntyID_C input', entryIDtoHtml); function entryIDtoHtml() { var i = 0; $(".InvEntyID_C input").each(function() { i++; var doc_id5 = $('#Field154\\(' + i + '\\)').val(); // entry id of document var e = 'Field157'; //target html field var open5 = '&dbid=0&openfile="true"'; var target5 = 'target="_blank"';//Add this in to get link to open in new tab var openLink5 = doc_id5 + open5; var link5 = "<a " + target5 + "href=https://test.com/WebLink/ElectronicFile.aspx?docid=" + openLink5 +"'>View Invoice</a>"; document.getElementById(e).innerHTML = link5; }); }