Skip to Content Skip to Menu

🕒 Save Time and Effort with CB Editor Assistant: Effortlessly create and refine content in Joomla 3, 4, & 5.
🎁 Limited Offer: Enjoy a 5-day FREE trial and save up to 30% afterward!

Ajax Autocompletition script for postal codes

  • selor
  • selor
  • OFFLINE
  • Posts: 32
  • Thanks: 1
  • Karma: 1
12 years 2 months ago #214951 by selor
Hi ,

I didn't really know if its the good forum for posting that .

I am searching to achieve an autocompletition for 2 fields in CB for French Postal Code and Town.
Maybe a CB Addon Already permit it ?? i doesnt really know all is it possible with DB Lookup ? or something with plug in Query or Autoaction ?

I have found the database for these codes and the all script in Jquery and Php here :
x-zolezzi.developpez.com/tutoriels/web/autocompletion/

How could i implement that with a field created with CB ??

Thanks for all the help.

Please Log in or Create an account to join the conversation.

  • selor
  • selor
  • OFFLINE
  • Posts: 32
  • Thanks: 1
  • Karma: 1
12 years 2 months ago - 12 years 2 months ago #214956 by selor
I have created a table "cp_autocomplete"
And i have inserted manually all the french postal codes.

The table is like that :
Code:
CREATE TABLE IF NOT EXISTS `cp_autocomplete` ( `CODEPAYS` char(2) NOT NULL, `CP` varchar(10) NOT NULL, `VILLE` varchar(180) NOT NULL, `NOMADMIN1` varchar(100) NOT NULL, `CODEADMIN1` varchar(20) NOT NULL, `NOMADMIN2` varchar(100) NOT NULL, `CODEADMIN2` varchar(20) NOT NULL, `NOMADMIN3` varchar(100) NOT NULL, `CODEADMIN3` varchar(20) NOT NULL, `LATITUDE` double NOT NULL, `LONGITUDE` double NOT NULL, `ACURANCY` int(1) NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1;

Now with AutoAction plugin how procede to compare the postal code in database in this table if i create a postal code field ? or maybe i could put the "VILLE" corresponding to the user choice from the fiel cb_cp in another field cb_ville ?
Last edit: 12 years 2 months ago by selor.

Please Log in or Create an account to join the conversation.

  • selor
  • selor
  • OFFLINE
  • Posts: 32
  • Thanks: 1
  • Karma: 1
12 years 2 months ago #214958 by selor
I am really next the solution but if someone could help me with Autoaction plugin ...

I doesnt know if i have to make with a "code" qwith jquery and what put if i take this choice ..
Or if choose "Query" in the plugin will be enough.

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48709
  • Thanks: 8319
  • Karma: 1447
12 years 2 months ago #214994 by krileon
I think DB Lookup maybe what you're after, but aside from that if you want ajax auto complete you're going to need to use a Code action to insert custom jQuery to the registration form (there's a registration form display trigger). We don't provide custom code so if you're unsure how to do this your self you'll need to contact someone to write the jQuery for you.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

  • selor
  • selor
  • OFFLINE
  • Posts: 32
  • Thanks: 1
  • Karma: 1
12 years 2 months ago #215110 by selor
This code working maybe its enough ?

x-zolezzi.developpez.com/tutoriels/web/autocompletion/

Please Log in or Create an account to join the conversation.

  • selor
  • selor
  • OFFLINE
  • Posts: 32
  • Thanks: 1
  • Karma: 1
12 years 2 months ago #215303 by selor
up ?

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum