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

Fixed Javascript: Extra params for Autocomplete field

Discussion in 'Resolved Bug Reports' started by sonnb, Sep 4, 2013.

  1. sonnb

    sonnb Well-Known Member

    Currently XenForo use this to pass extra params from data attribute to POST data.

    Code:
    if ($input.data('acOptions'))
                {
                    options = $.extend(options, $.parseJSON($input.data('acOptions')));
                }
    But since this example
    Code:
    data-acoptions="{"extraParams":1}"
    would be automatically parsed as Object when calling: $input.data('acOptions'). It would not able to pass any params as parseJSON returns null.

    It should be (without parseJSON).
    Code:
    if ($input.data('acOptions'))
                {
                    options = $.extend(options, $input.data('acOptions'));
                }
     
    CyberAP likes this.
  2. Mike

    Mike XenForo Developer Staff Member

    Confirmed and removed for 1.2.2.
     
    RoldanLT likes this.

Share This Page