0
votes

In Sharepoint 2013, I'm working with a hidden Lookup field which is necessary for me to do what I want to do, utilizing the SPServices jQuery library. This lookup field is populated dynamically with jQuery from an Autocomplete text field. (Basically, this is my work around for Sharepoint's lack of a native autocomplete lookup field - I'm instead using the SPServices autocomplete lookup, then injecting the result into an invisible dropdown lookup field, so I still get to create associations with the lookup.

THE QUESTION: Is there a way to keep Sharepoint's lookup field from autopopulating with an option tag for each of our many many items in the table it's looking up from? I suppose it would max out at 20 options under IE, but other browswers would try to load the entire list, right?

I know this would require a server-side solution, not Jquery. I know that there are a lot of FormField properties available...would anything there help me?

My original idea was to just remove the lookup field from being loaded on the page, then inject my simplified version of it with Jquery on client-side page load. However, it appears that Sharepoint isn't able to submit that field if it wasn't originally in there when the fields are built on initial page load. (or maybe I just did something else wrong)

Thoughts on this matter are appreciated!

P.S. - This is the on-premise standard version of Sharepoint 2013 I'm working with.

1

1 Answers

0
votes

You are right that SharePoint renders lookup with more than 20 items in IE in different way (it uses some kind of lazy loading). I use this JS library for manipulating field values in SP forms via JS and it work fine. It is updated regularly to support SP 2013 and for bug removing.