Results 1 to 10 of 10

Thread: state,provinces,countries - interdependent fields

  1. #1
    Join Date
    Oct 2008
    Posts
    6

    Question state,provinces,countries - interdependent fields

    I am trying to set up a site with listings in multiple countries. I am trying to figure out a way to set up the listing template fields with the state, province, and country fields.

    The problem is I can't figure out is if there is a way to make the state/province field dependent on the country field.

    For instance the if the agent selects USA they should only be able to select a US state but if they select France they should only be able to select a French province.

    Is there any way to make two fields related like that?

    I have thought of few solutions - none of which I like. I will list them below for discussion purposes.

    1. Since I not going to have that many countries(at first?) make a property class for each country, then make a state/province field for each country property type.
    PROBLEM: If I start using tons of countries this will suck

    2. Create javascript function that monitors that country dropdown and then dynamically loads that state or provinces for a country when it is selected.
    PROBLEM: Done outside of OR's admin console

    Thanks for any help.

  2. #2
    Join Date
    Sep 2003
    Location
    London UK
    Posts
    1,654

    Default Re: state,provinces,countries - interdependent fields

    Hi Ted

    this addon may help by Gregor
    http://support.open-realty.org/showthread.php?t=19241

    Albert

  3. #3
    Join Date
    Oct 2008
    Posts
    6

    Default Re: state,provinces,countries - interdependent fields

    I guess I left a pretty important piece of info in my question.

    I am wanting to effect the "add listing" and "edit listing" forms in the admin area. I am new to OR but what it seems like is that you can't put addon tags in the admin area. Is that correct?

  4. #4
    Join Date
    Sep 2003
    Location
    London UK
    Posts
    1,654

    Default Re: state,provinces,countries - interdependent fields

    Hi

    The only person i know that has worked on admin editing via an addon is revive

    Albert

    Quote Originally Posted by tedbow View Post
    I guess I left a pretty important piece of info in my question.

    I am wanting to effect the "add listing" and "edit listing" forms in the admin area. I am new to OR but what it seems like is that you can't put addon tags in the admin area. Is that correct?

  5. #5
    Join Date
    Nov 2006
    Posts
    179

    Default Re: state,provinces,countries - interdependent fields

    In fact you had already answered your question at your first post..
    for now you have two choices as you said..
    for the second choice;
    as I remember once upon a time there was an expensive addon but it was also need some core modifications.. I am not a good coder but as I could observe for now you must have core mod to obtain what you want whatever it is an addon..
    because that's not enough to edit add and edit_listing functions..
    I advise you to adapt Goody's ajaxcombo...
    .,;

  6. #6
    Join Date
    Sep 2004
    Location
    London, UK
    Posts
    15

    Default Re: state,provinces,countries - interdependent fields

    Hi sonli,

    This is my reply for your PM.

    firstly thanks for this great addon. In fact I am trying to adapt it in admin part, but I had a problem:
    I must use some utf-8 characters like ş,ç,ü,..etc. in county values, but when I use them ajax call is giving error.
    I tried to save the files as utf-8 but it didnot work. What can I do to solve it?
    When I put this together, I only tested it with 2.5.2 for English Language and I have also implemented the ComboDropdown on Add Listing and Edit My Listing pages on the Admin Panel without any problem (of course tweaking one of those .inc.php files).

    Just naming county with different character shouldn't really trigger Ajax problem; but again if you use characters that clash with Ajax coding, you will definitely have problems.

    Best of luck!

    To err is human; but to really mess things up requires a computer.

  7. #7
    Join Date
    Apr 2009
    Posts
    21

    Default Re: state,provinces,countries - interdependent fields

    Hi Goody

    I also want to implement ComboDropdown on Add Listing and Edit My Listing pages on the Admin Panel.
    Could you please provide me which .inc.php file to be edited and what to edit
    I am using OR 2.5.6
    Regards
    Rizwan

  8. #8
    Join Date
    Jul 2009
    Posts
    4

    Default Re: state,provinces,countries - interdependent fields

    Goody I sent you a PM regarding what Rizwan was asking. I am not sure it sent as it gave me no confirmation so I thought I was just re-state it here as Rizwan did.

    I also want to implement ComboDropdown on Add Listing and Edit My Listing pages on the Admin Panel.
    Could you please provide me which .inc.php file to be edited and what to edit
    I am using OR 2.5.6
    Thanks
    Shaun

  9. #9
    Join Date
    Mar 2004
    Age
    98
    Posts
    207

    Default Re: state,provinces,countries - interdependent fields

    http://www.betterlets.com/listed/admin/
    Log in as listed, pass listed and add a listing.
    When your listing has been created wait a second cos the page refreshes intio the edit listing page. listed can make 10 listings so .... would be good if you delete afterwards.
    It is working off the ajax3combo addon so fields could be added/changed for
    country/anything/anything smaller
    Pulls out of the zipdist table, lat longs and zipcodes at the moment, but does not need to.

    Rob

  10. #10
    Join Date
    Nov 2009
    Posts
    2

    Default stateprovincescountries interdependent f

    There is no default vbulletin option to do what you want. But, you could create a new profile field and allow users to say Yes or No to seeing mini profile fields and then put a condition around those things based on the users profile field.

Similar Threads

  1. Linking Select Fields - State/City - A solution!
    By zmc in forum Addon help, ideas and discussion (CLOSED)
    Replies: 19
    Last Post: 07-03-2009, 02:50 PM
  2. linking towns to provinces
    By heinz in forum Installation/Configuration Help (CLOSED)
    Replies: 2
    Last Post: 04-01-2008, 03:46 PM
  3. Canadian Provinces instead of Amercian States
    By jmkaep in forum Installation/Configuration Help (CLOSED)
    Replies: 2
    Last Post: 01-08-2008, 04:23 PM
  4. Other Countries Provinces
    By makeup4brides in forum General Help (CLOSED)
    Replies: 3
    Last Post: 07-19-2006, 10:39 AM

Tags for this Thread

Bookmarks

Posting Permissions

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