• 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!

TOPIC: Auto-populate CITY with ZIPCODE field

Auto-populate CITY with ZIPCODE field 9 years 3 months ago #33639

  • loneildo
  • loneildo's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 17
Hello,

I would know how city field can be auto-populated when an user enter zipcode.

Maybe by using Ziptastic?

Thanks a lot.
The administrator has disabled public write access.

Auto-populate CITY with ZIPCODE field 9 years 3 months ago #33649

  • loneildo
  • loneildo's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 17
I try to use this script, but ok to call it in form?

<script type="text/javascript" src="jquery.ziptastic.js"></script>
<script type="text/javascript">(function($) {
$(function() {
var duration = 500;
var elements = {
country: $('#country'),
city: $('#city'),
zip: $('#zipcode')
}
// Initially hide the city/state/zip
elements.country.parent().hide();
elements.state.parent().hide();
elements.state_short.parent().hide();
elements.city.parent().hide();
// Initialize the ziptastic and bind to the change of zip code
elements.zip.ziptastic().on('zipChange', function(evt, country, state, state_short, city, zip) {
// Country
elements.country.val(country).parent().show(duration);
// State
elements.state_short.val(state_short).parent().show(duration);
elements.state.val(state).parent().show(duration);
// City
elements.city.val(city).parent().show(duration);
});
});
}(jQuery));</script>
The administrator has disabled public write access.

Auto-populate CITY with ZIPCODE field 9 years 3 months ago #33650

  • alexp
  • alexp's Avatar
  • OFFLINE
  • RSJoomla! Official Staff
  • Posts: 2253
  • Thank you received: 180
You can place the script within the form's CSS/Javascript area, Javascript section, if this is what you are asking.
Please note: my help is not official customer support. To receive your support, submit a ticket by clicking here
Regards,
RSJoomla! Development Team
The administrator has disabled public write access.

Auto-populate CITY with ZIPCODE field 9 years 3 months ago #33651

  • loneildo
  • loneildo's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 17
Hello,

Yes, i placed it in this section, but script is not called.

Do you have any idea?
The administrator has disabled public write access.

Auto-populate CITY with ZIPCODE field 9 years 3 months ago #33652

  • alexp
  • alexp's Avatar
  • OFFLINE
  • RSJoomla! Official Staff
  • Posts: 2253
  • Thank you received: 180
can you post a link to the form ?
Please note: my help is not official customer support. To receive your support, submit a ticket by clicking here
Regards,
RSJoomla! Development Team
The administrator has disabled public write access.

Auto-populate CITY with ZIPCODE field 9 years 3 months ago #33653

  • loneildo
  • loneildo's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 17
Can i sent you link in pm?
The administrator has disabled public write access.

Auto-populate CITY with ZIPCODE field 9 years 3 months ago #33659

  • loneildo
  • loneildo's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 17
No?
The administrator has disabled public write access.

Auto-populate CITY with ZIPCODE field 9 years 3 months ago #33677

  • alexp
  • alexp's Avatar
  • OFFLINE
  • RSJoomla! Official Staff
  • Posts: 2253
  • Thank you received: 180
Sending me the form link won't allow other forum users to provide assistance with this.
Please note: my help is not official customer support. To receive your support, submit a ticket by clicking here
Regards,
RSJoomla! Development Team
The administrator has disabled public write access.

Auto-populate CITY with ZIPCODE field 9 years 3 months ago #33685

  • loneildo
  • loneildo's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 17
They will don't understand with form, they will understand with a detailed solution. I will post this detailed solution.
The administrator has disabled public write access.
  • 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!