I'm working with a Square API form where I have a zip code field <div id="sq-postal-code"></div>
.
I know how to get the zip code from an existing client in Square, but I don't know how to pre-populate this field with a value. The field is inside an iframe loaded from squareup.com so it's kind of difficult to just send some value to this field with jQuery or any other way.
What can I do to pre-populate this field?
Thanks.
Reaching out to our API Team to pick their brains. We'll circle back once we get a response.
Thanks for your patience!
Back with a word from the API Team: The payment form has a setPostalCode function that will accomplish what you're looking to do. Here's a resource - https://developer.squareup.com/docs/api/paymentform#setpostalcode
Square Community