How to use MemberScript #48 for multiple address input fields on the same page? Answered

Post author
Chas Law-Davis

Julian Galluzzo G'day, I'm implementing MemberScript #48 and is working great. I, however, only have one input field where I'd like a full address to be shown (e.g. 12 Memberstack Street, Adelaide, South Australia). Could you show me how this works or link to a page explaining so. Thanks heaps. Chas

Comments

3 comments

  • Comment author
    Julian Galluzzo

    Hey Chas! I would recommend using ChatGPT and the Google Places API to figure that out - here are the docs! https://developers.google.com/maps/documentation/places/web-service/overview

    0
  • Comment author
    Gabriel Babus

    Hi there, how can i make it so that I can use two autocomplete address inputs on the same page? Currently it only works on one of the input fields

    I'm talking about script #48

    Please let me know 🙏

    0
  • Comment author
    A J

    Hey Gabriel Babus, I believe this script by default works for a single set of autocomplete address inputs on the same pagepage. And when multiple inputs are used in the same page, there might be a conflict which might not give us the accurate experience by default. In case you want it to work for multiple fields, the code needs to be tweaked to target relevant form fields uniquely. I personally haven't tested this out since I need to setup the console and enable billing for places api for this but yes, to solve this the code needs to be tweaked for the attributes accordingly. You could have unique attribute values for the second set of fields and tweak the memberscript to work for those fields separately.

    0

Please sign in to leave a comment.