I am trying to figure out how to make a title column of a document library search a list. The Title column of the document library in this application is called "vendor name". What I want to happen, is for the user to have a dynamic dropdown list like google. If the user types in "s", the title field should look at the "vendor list" for names of vendors that contain the letter s, and create a dropdown filled with those names. We have to many vendors to make a normal dropdown list work, so I wanted to add a filtering capability to the dropdown. Is there any way to do this?
Edit: For those who wanted the code... This is working on a content editor, but I can't figure out how to make it work on the title column of a list..
<script src="https://code.jquery.com/jquery-1.12.4.js"></script>
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.SPServices/2014.02/jquery.SPServices-2014.02.min.js"></script>
<script>
// A $( document ).ready() block.
var availableTags = [];
$( document ).ready(function() {
$().SPServices({
operation: "GetListItems",
async: false,
listName: "VendorName", // or list name.
CAMLViewFields: "<ViewFields><FieldRef Name='Title' /></ViewFields>",
CAMLQuery: "<Query></Query>",
completefunc: function (xData, Status){
$(xData.responseXML).SPFilterNode("z:row").each(function(){
var title =$(this).attr("ows_Title");
availableTags.push(title);
});
}
});
});
$( function() {
$( "#tags" ).autocomplete({
source: availableTags
});
} );
</script>
<div class="ui-widget">
<label for="tags">Vendor Name: </label>
<input id="tags">
</div>