How to hide the 'edit' link on currency field on a form

rightpalava
Mega Expert

When using a currency field (and having multiple currencies available) there is a blue 'Edit' link next to the currency drop down.   I've no idea why and want to be hidden.   Cannot find a way.   Any ideas?   Russell Hart did you say you had a way?

1 ACCEPTED SOLUTION

rightpalava
Mega Expert

So I've now found a working solution for this -



A simple client script where the id is the id of the edit link (found by inspecting it)



function onLoad() {


document.getElementById("<<id>>.editLink").style.display="none";  


document.getElementById("<<id>>.editLink").style.display="none";


}


View solution in original post

13 REPLIES 13

Sure, here you go:


Screen Shot 2014-06-02 at 10.52.46.png


rightpalava
Mega Expert

So I've now found a working solution for this -



A simple client script where the id is the id of the edit link (found by inspecting it)



function onLoad() {


document.getElementById("<<id>>.editLink").style.display="none";  


document.getElementById("<<id>>.editLink").style.display="none";


}


Adam,



This post is where I originally received the resolution to the same issue, however, your answer is no longer functioning.   I am now receiving a "Unable to get property 'style' of undefined or null reference" on the following code that you provided



function onLoad() {


  document.getElementById("u_ehs_form.u_estimated_value.editlink").style.display="none";


  document.getElementById("u_ehs_form.u_estimated_value2.editlink").style.display="none";


}



Any thoughts?



Thanks in advance.


I tried this script in Geneva and saw that the button (now a pencil icon) does not disappear. I put an alert after the call and I noticed the button disappears when the alert is shown (so it is hidden) but then appears again. So something is loading it after.


Stacey,



Not sure how you created your script,   just to compare, here is how I built it and still functions correctly in "Geneva."   Be sure to confirm your punctuation, it always gets me sometimes as well.


Type: OnLoad


Table: <your table>


Script:


function onLoad() {


  document.getElementById("<your table>.<field_name>.editLink").style.display="none";


  document.getElementById("<your table>.<field_name>.currency").style.display="none";


}


Hope this helps.