interesting API... like it... i think...
does not seem that tricky to implement, with the exception of the "...has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource."
is.gd/fNujQC
i think it totally makes sense to enter zip codes first and then autofill city state codes...
securely addressing the above error will be the tricky part...
@chadlly2003, the way to implement this is to register for an application key, copy the the javascript code from here:
https://www.zipcodeapi.com/API#example1
and then place that on the page where you have your address... you then need to change the key in the js code to your key, find this code:
Code:
//from:
container.find("input[name='zipcode']").on("keyup change", function() {
//to:
container.find("input[name='postcode']").on("keyup change", function() {
you will then need to find the container that the postcode is in on your page, and change the following 2 elements:
Code:
var container = $("#example1");
var errorDiv = container.find("div.text-error");
is.gd/fNujQC
those 2 elements will be dependent on your template.
hope that gives you enough to go on.... not super easy but again not super hard. the error i'm experiencing above will be tickier to solve. you should be able to see that in the developer tools console of your browser.
good luck.
Bookmarks