Multi Line Address

This topic contains 8 replies, has 4 voices, and was last updated by  Stiofan O’Connor 10 years ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #32844

    Ian Butler
    Buyer
    Post count: 59

    Hi,

    Is there any way to modify this so users can enter an address over multiple lines?

    <input type=”text” value=”” class=”geodir_textfield” id=”post_address” name=”post_address” field_type=”address”>

    Thanks

    #32851

    Guust
    Moderator
    Post count: 29970

    You want users to add more than one line for the street address? Or do you mean you want to display the address on multiple lines?
    Have a look here:
    https://wpgeodirectory.com/support/topic/change-display-order-of-field/

    #32862

    Ian Butler
    Buyer
    Post count: 59

    You want users to add more than one line for the street address?

    Yes – some addresses can span multiple lines before you even get to the country/region/city sections

    Thanks

    #32865

    Guust
    Moderator
    Post count: 29970

    From admin, you can add <br/> into the address and that will separate into two lines, but that does not work from the frontend.
    I’ll get Paolo to have a look at your question too.

    #32879

    Paolo
    Site Admin
    Post count: 31211

    That is not possible. The address field must be a unique input field to be able to look up addresses in Google Maps.

    Thanks

    #32999

    Ian Butler
    Buyer
    Post count: 59

    Okay thanks, in that case can you point me in the right direction for which files handle the Google Maps API.

    Using their example it IS possible to generate a street address:

    https://developers.google.com/maps/documentation/javascript/examples/places-autocomplete-addressform

    However GeoDirectory isn’t pulling all the info through. For example, when entering Chester Zoo, Google suggests: Chester Zoo, Upton-by-Chester, Chester, United Kingdom. The section in bold, the street address isn’t populated in the fields below, which means front end users aren’t getting the correct address.

    I’ve looked in geodirectory_template_actions.php where I can see the add listing_form hook but cant see anything related to address or Google Maps.

    Thanks again for your help

    #33019

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    Hi Iain,

    That field is only meant for the street address, i’m not familiar with that area, if upton-by-chester is a region of chester then you could enable neighbourhoods and add it there?

    Stiofan

    #33027

    Ian Butler
    Buyer
    Post count: 59

    Thanks Stiofan,

    I tried enabling neighborhoods, but the HTML has display:none attached to it..?

    
    
    <div id="geodir_post_neighbourhood_row" class="geodir_form_row geodir_location_add_listing_neighbourhood_chosen_container clearfix" style="display: none;">
    <label>Neighbourhood</label>
    <div class="geodir_location_add_listing_neighbourhood_chosen_div" style="width: 57%; float: left; display: none;">
    <select class="chosen_select" option-ajaxchosen="false" name="post_neighbourhood" style="display: none;"> </select>
    <div class="geodir-chosen-container geodir-chosen-container-single geodir-chosen-container-single-nosearch" style="width: 0px;" title="">
    <a class="chosen-single chosen-default" tabindex="-1">
    <span>Select an Option</span>
    <div>
    <b></b>
    </div>
    </a>
    <div class="chosen-drop">
    <div class="chosen-search">
    <input type="text" autocomplete="off" readonly="">
    </div>
    <div class="chosen-results"></div>
    </div>
    </div>
    </div>
    <span class="geodir_message_note">Click on above field and type to filter list</span>
    </div>

    When I choose an address the html displays briefly, a loading bar appears, then it disappears and no neighborhood has been entered

    #33029

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    unlike others they have to be added manually by the admin in the backend.

    Stiofan

Viewing 9 posts - 1 through 9 (of 9 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
20% Discount Offer
Hurry! Get your 20% discount before it expires. Get 20% Discount