Page 1 of 1
Address entry for listit
Posted: Tue Dec 02, 2014 11:33 pm
by jongs
I am using listit2 to display locations on Calguys Google Maps using text fields to enter longitude and latitude entries for the map points.
I need to add points by entering the address of the location instead of the long lat.
Could I add javascript to the input page of the module or is there a module that could combine?
Any thoughts (solutions!) much appreciated.
Re: Address entry for listit
Posted: Wed Dec 03, 2014 9:10 pm
by psy
Use the 'module_custom' directory method to create your own admin template to override the LI2 default edititem.tpl, eg
module_custom/ListIt2MyInstance/templates/edititem.tpl
You can then put whatever you like in the template.
See:
http://docs.cmsmadesimple.org/customizi ... -templates
Re: Address entry for listit
Posted: Wed Dec 03, 2014 10:27 pm
by cb2004
Download the version of LI2 in Git, it supports this out of the box.
Re: Address entry for listit
Posted: Sun Dec 14, 2014 5:21 pm
by jongs
First, thank you for the replies. Unfortunately home problem and then illness stopped me from looking at it until now.
I was unable to find or see how listit2 does this out of the box so I took on the template customizing method. I must admit I haven't managed to implement module_custom directory yet but the advice you gave me got me started on customizing the edititem.tpl.
For anyone finding this thread I used the javascript from
http://php-ease.com/forms/latitude-long ... inder.html and also edited input.TextInput.tpl to add an id to the input field so the script could update the lat long fields.
It is working fine and when off my sick bed I will move the templates to custom directory to prevent module updates from overwriting the changes.
Thanks again