Multi Line Address
This topic contains 8 replies, has 4 voices, and was last updated by Stiofan O’Connor 10 years, 10 months ago.
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket-
AuthorPosts
-
March 4, 2015 at 11:45 am #32844
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
March 4, 2015 at 12:12 pm #32851You 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/March 4, 2015 at 1:18 pm #32862You 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
March 4, 2015 at 1:40 pm #32865From 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.March 4, 2015 at 3:15 pm #32879That is not possible. The address field must be a unique input field to be able to look up addresses in Google Maps.
Thanks
March 5, 2015 at 2:04 pm #32999Okay 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
March 5, 2015 at 6:33 pm #33019Hi 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
March 5, 2015 at 7:14 pm #33027Thanks 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
March 5, 2015 at 7:16 pm #33029unlike others they have to be added manually by the admin in the backend.
Stiofan
-
AuthorPosts
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket