Auto prompting City and State using ZIP code in Members Registration Form

68 views
Skip to first unread message

Ram

unread,
Sep 26, 2020, 2:28:34 AM9/26/20
to django...@googlegroups.com
Hi,

We are trying to use USPS API to get City and State attributes by passing ZIP code. API is working fine, but we need to use this API in our members registration form, where user enters ZIP code, then City and State should be auto filled in respective fields. This way user does not have to type City and State manually.

We would like to know what is the easiest and quicker way to achieve this in Django or other type web forms.

Thanks in advance,
~Ram


o1bigtenor

unread,
Sep 26, 2020, 7:38:18 AM9/26/20
to django...@googlegroups.com
On Sat, Sep 26, 2020 at 1:28 AM Ram <ram.mu...@gmail.com> wrote:
>
> Hi,
>
> We are trying to use USPS API to get City and State attributes by passing ZIP code. API is working fine, but we need to use this API in our members registration form, where user enters ZIP code, then City and State should be auto filled in respective fields. This way user does not have to type City and State manually.
>

A heads up for you.
Zipcodes are not necessarily a reliable means of determining location!
If the individual lives in a rural area the zipcode is actually quite
useless for locational information.

Regards

Mohd Aqib

unread,
Sep 26, 2020, 11:06:37 AM9/26/20
to Django users
Hi Ram,

You have to save City and State in your database linked in State >> City >> Region(with zipcode) manner. Now create a get request API which requires zipcode as input and return city and state to fill automatically.
Reply all
Reply to author
Forward
0 new messages