1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Specifying XenForo.AutoComplete.defaultUrl

Discussion in 'XenForo Development Discussions' started by Jeremy P, Jan 22, 2011.

  1. Jeremy P

    Jeremy P Well-Known Member

    In an addon, I am trying to replicate the autocomplete functionality from the "Members" page (Find Member). I have got the PHP setup right, but I am not sure how to specify the defaultUrl for it to use the appropriate action for my addon.

    Changing it manually in xenforo.js does what I need, but how would it be set in a template? using some data attribute on the form?

  2. Shadab

    Shadab Well-Known Member

    Haven't tried, but data-acUrl="" should work.

    this.url = $input.data('acUrl') || XenForo.AutoComplete.defaultUrl;
    Jeremy P likes this.
  3. Jeremy P

    Jeremy P Well-Known Member

    Worked great, thank you.

Share This Page