locked
Hiding Lookup Fields RRS feed

  • Question

  •  

    I was wondering if anyone had the code for how to hide lookup fields like you do with navchar fields. I currently use the following code

     

    crmForm.all.new_allianceid.style.display="none"

     

    to try and hide the lookup field. It only hides the little look up magnify glass icon and not the whole field so while I can't open the lookup windown I can still type in the data which is what I want to disable.

    Thursday, November 13, 2008 6:24 PM

Answers

  • For all fields, you can hide the containing element by adding _d to the field name - e.g.

     

    crmForm.all.new_allianceid_d.style.display="none";

     

    You can hide the caption in a similar way with _c.

     

    Note that this is unsupported

    Friday, November 14, 2008 10:09 AM
    Moderator

All replies

  • For all fields, you can hide the containing element by adding _d to the field name - e.g.

     

    crmForm.all.new_allianceid_d.style.display="none";

     

    You can hide the caption in a similar way with _c.

     

    Note that this is unsupported

    Friday, November 14, 2008 10:09 AM
    Moderator
  • Thanks kindly I knew it had to be one little edit in there that would make them go away just wasn't sure what it was. Let's hope this sticks around for the next version as well.

     

    Thanks again.

     

    P.S. is there a way to hide a tab on a the form. Say the tab is title 'sales' and I want it to show when a field says value 'x'?

    Friday, November 14, 2008 8:34 PM