function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
garybgaryb 

Lookup button, inputfields, and standardStylesheets=false

Hi all,

 

I've got a field on a Visualforce page that has changed from a picklist to a look up. I have standardStyleSheets="false" in the page tag. I have an inputfield that binds to the look up on the object that I want to populate. I've tried a number of things but I can't get the lookup button that appears next to a lookup field to display.

 

If I change standardStylesheets to true, it will appear - but the rest of my page breaks.

 

Any ideas on how to fix this?

Best Answer chosen by Admin (Salesforce Developers) 
garybgaryb

The issue was a style that was missing due to it being in the standard stylesheet and not define in out custom stylesheet. I ended up adding the style in to our custom stylesheet, and it appears to have worked.

All Answers

garybgaryb

The issue was a style that was missing due to it being in the standard stylesheet and not define in out custom stylesheet. I ended up adding the style in to our custom stylesheet, and it appears to have worked.

This was selected as the best answer
jwetzlerjwetzler

I'm glad you found a solution for yourself, though depending on your solution it may not be totally future-proof.  Components like inputField which are meant to look and behave like salesforce are not technically supported if you turn the stylesheets they need off.  If you're referring directly to one of our images it's possible the name or location of that image can change.  Just an FYI for you.

garybgaryb

Thanks for the heads up Jill, I thought there may be implications down the road, but we can at least address the second issue by updating the image referred to (which, for look and feel purposes, will probably happen anyway). As for the first issue... well, let's see what happens. Unless you know of a (future-proof) way to drag in a reference to the stylesheet for just that one field?

jwetzlerjwetzler

Not really.  You could download the image itself and upload it as a static resource but that may not even be worth it to you.  If there's an update to the skin and that button changes in appearance you wouldn't get the new look (as you probably wouldn't with your current solution either).  Unfortunately the only future proof way is to use our stylesheets :)