Wait for From and To values to populate before running autocomplete

Home Forums vLooup for SharePoint Wait for From and To values to populate before running autocomplete

Viewing 1 reply thread
  • Author
    Posts
    • #34127
      Jonathan Stamper
      Participant

        I have a vLookup that populates a specific field on the child list. The child list form would then use that field value as a filter for an autocomplete field in the child form.

        The issue I’m running into is the autocomplete occurs before the vLookup field is populated (even when I set the ac in a document ready state with jQuery). My custom js sits in an external js file and was curious about if it’s an issue with precedence (custom js vs external) and how I get the vLookup to populate the field first so I then do the ac?

      • #34129
        Jonathan Stamper
        Participant

          Ah-ha! I just wrapped the ac in

          
          
          window.addEventListener(‘load’, function(){
           spjs.ac.textfield({…});
          });

          That seems to have worked, unless there is a better approach.

      Viewing 1 reply thread
      • You must be logged in to reply to this topic.