• Resolved snknick

    (@snknick)


    Couldn’t get things working with Ninja Forms, field ID was nf-field-7 but nothing was happening. Had a look and the fields variable was being populated by nf-field-7-container (and only that). Reading the code it looks like it’s been set to populate an array with all fields that start with any of the given entries set in Field IDs but is stopping at the first one.

    Changed the following lines in simple-address-autocomplete-public.js to get things working. No idea if this will break other installs with different forms/multiple fields that need checking but it fixed this one (change in both was to remove the ^ so it only looked for exact IDs).

    Line 43:

    fields = document.querySelector([id="${inputValues[i]}"]);

    Line 54:

    const fields = document.querySelectorAll([id="${inputValues[i]}"]);

Viewing 1 replies (of 1 total)
  • Plugin Author Raza Khadim

    (@razakhadim)

    @snknick thanks for pointing out the issue and glad you have sorted it.

    It will probably break the Forminator forms because the whole purpose of the update was to make it work for Forminator forms. I have a couple of ideas on how I can avoid this. I will try and push it as soon as I could.

    Thanks.

Viewing 1 replies (of 1 total)
  • The topic ‘Ninja Forms – Picking up container div ID not field ID’ is closed to new replies.