This topic is locked

Replace Select with image to Edit as lookup wizard and choose list page with search.

3/25/2024 11:29:30 AM
PHPRunner Tips and Tricks
G
Grdimitris author

In the case that you have a Lookup field with the option List page with search and instead of the word Select you want an image then add the following jquery code to the Javascript on load of the page that has the Lookup field
$("[id^='openlookup']").html('<img src="/images/search-36.png" alt="Select" class="search-icon" >');
It turns the Select into an image, here the image search-36.png that I put in the images folder in the source folder where we have the project.
If I want it to appear next to the Lookup field, then I add the following to the modify CSS located in the Editor (STYLE).

/ Select or image next to Lookup field /
.bs-list-lookup{
display: inline-block !important;
vertical-align: middle !important;
}
.bs-lookup-links{
display: inline-block !important;
margin-left: 5px !important;
}

The !important is to make sure the rule is applied.
The rule aplied for all Lookup fields in project but the image to pages where we add the jquery code.

I use this image 36px X 36px for normal size under theme.

img alt