Quantcast
Viewing all articles
Browse latest Browse all 6517

New Post: Global complex to simple lookups fields from the master page.

Hi folks,

I wanted to share this snippet. It could be placed directly in the master page in the page head but I prefer to keep my javascript customizations in a separate JS file, which prevent the need to checkin the master page for changes. I've wrapped this in the document.ready function which is not required if you already have the wrapper defined in your code.
  $(document).ready(function (){
         var selects = $('.ms-lookuptypeintextbox');
if (selects.length > 0) {
    $(selects).each(function(index, value) {
        $().SPServices.SPComplexToSimpleDropdown({
            columnName: $(this).attr('title') 
        }); 
    });
}
  });
At runtime, the jQuery selector will select all the complex dropdowns and convert them to simple dropdowns. -enjoy-

Viewing all articles
Browse latest Browse all 6517

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>