I have an html-enabled calculated column that I wanted to transfer to JS Link. The calculated column contains an icon, that when clicked, opens an edit form in a modal box. How do I structure this in JS link?
Here are the details:
- Internal Field Name: "AA01_OpenEditForm"
- Column Display Name: "Update"
Below is the Calculated/Number Column:
"<a href='#' onclick="&"SP.UI.ModalDialog.OpenPopUpPage('mysite/Companies/… src='/SiteAssets/elements/images/edit-file.png' style='height:20px; width:20px;' title='Click this icon to edit or update this Company'>"&"</a>"
MyLink2field then add a function likelink2FieldTemplate. This means you are defining a function as a template for each field. 2) You put that link in a library and refer that path in list view web part properties. 3) You are telling your list view web part to use your JS file to apply customization. It works if you open web part page in a poup also.="<a href='#' onclick="&"SP.UI.ModalDialog.OpenPopUpPage('https://mysite/Companies/Update.aspx?ID="&txtId&"');"&">"&"