Results 1 to 6 of 6

Thread: Need suggestions-auto populate field

  1. #1
    Join Date
    Mar 2007
    Posts
    47

    Default Need suggestions-auto populate field

    Need some suggestion on how to do this.
    I have fields in addform custom fields "postcode" "lat" "lng"
    I have geocoded postcodes on the first part of the postcode ie:PL24 (I don't need any more detailed that this) ready to create a new table in database with this info.
    How do I go about intergrating this information and what I also want is when a user types in the first part of their postcode in the addform I want the lat, lng fields to automatically update with the correct info called from my new table.
    Hope I explained that ok.
    ps I know I can join a payed service for this, but want this done without using them.
    Thanks

  2. #2
    Join Date
    Jun 2002
    Location
    Winnipeg Canada
    Posts
    4,913

    Default

    To start with your second question about typing into a form. That's going to require some coding and autocompletion but it shouldn't be that hard.

    If the data is there, all the form has to do is update itself. Don't get me wrong, I have no idea how to do that, but it shouldn't be too hard.

    As for the first question and integrating the geocoding information you can search the forum for google maps and it will show you how you can integrate latitude/longitude.

  3. #3
    Join Date
    Mar 2007
    Posts
    47

    Default

    Thanks Bruceper,
    I have got google maps intergrated already on my sites nopoblem and using lat/lon but I had to enter them manually.
    I wanted to add my table with the geocoded postcodes to indexu database with out breaking the whole site LOL.
    Since posting I have sat down and eat a great book all about ajax.It looks as this is the way to go as I can call the data from a cetral server and use the same information for all my site as once without using indexu database.
    So now the user only has to enter the first part of the postcode and the lat/lon fields are automatically filled in and entered when they add a listing. Google map picks up this and bobs your uncle all done

  4. #4
    Join Date
    Nov 2004
    Posts
    1,822

    Default

    like this?
    http://www.bigfreeguide.com/camping/add.php

    you type in a UK postcode and it collects lat/lon and focuses the map when you defocus the postcode box.
    Main IndexU sites : | Campsite Directory | Tourist Guide | Places2B | AfterDirectory <-- Half price submission using coupon DP50 (from just $11 premium, and $10 basic permanent )

  5. #5
    Join Date
    Mar 2007
    Posts
    47

    Default

    Yes inspireme
    That exactly what I wanted to do, but with out paying a 3rd party to do it. I know their rates are not bad once the directory is up and running as submissions won't be rushing in, in the 100s, but at the moment I have 11,700 odd listings to add to my sites and none of them have lat/lon values. So at the moment this is the cheaper option. (apart from the cost of a wig to replace the hair I pulled out this weekend LOL).

  6. #6
    Join Date
    Nov 2004
    Posts
    1,822

    Default

    im not paying a third party for that... im using a free database from npemaps.org.uk i coded a php file to find the closest postcode, and we just use that, its not accurate enough so people have to fine tune on a map.

    If you have old listings im not sure how you could work it... you really need the submitter to choose location.

    It uses ajax to return all the information.

    I would be happy to make a mod so you could use this, if you feel it would be useful .
    Main IndexU sites : | Campsite Directory | Tourist Guide | Places2B | AfterDirectory <-- Half price submission using coupon DP50 (from just $11 premium, and $10 basic permanent )

Similar Threads

  1. populate thumbnails for each link.
    By grayeminence in forum Blocks and Modification
    Replies: 56
    Last Post: 02-03-2008, 11:06 AM
  2. FREE Automotive Directory - Help me populate my baby!
    By enginerunup in forum Sites in Action
    Replies: 3
    Last Post: 06-05-2007, 10:11 AM
  3. Suggestions
    By richhead in forum v3.2
    Replies: 3
    Last Post: 07-16-2003, 08:53 AM
  4. some suggestions
    By dbmg in forum v3.2
    Replies: 1
    Last Post: 08-06-2002, 02:56 AM
  5. Replies: 4
    Last Post: 12-19-2001, 03:22 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •