-
Zh GoogleMap
-
Component
-
creating form on marker
creating form on marker
-
Eddstyson
-
Topic Author
-
Offline
-
Junior Member
-
Less
More
-
Posts: 26
-
Thank you received: 0
-
-
10 years 9 months ago #2823
by Eddstyson
can anyone assist me on how to create a form that links to a database on a marker...firstname...lastname..activityinthisregion
Please Log in or Create an account to join the conversation.
Less
More
-
Posts: 4609
-
Thank you received: 460
-
-
-
-
-
10 years 9 months ago #2825
by Dima
Hi
For what reason you need form. You can enter your placemarks in admin, and set association with contact, for example. Or enter all your information in infowin content
Please Log in or Create an account to join the conversation.
Less
More
-
Posts: 9
-
Thank you received: 0
-
-
10 years 5 months ago #3983
by racetech
Hi Dima,
I wanted to insert data from a table, created by me in my joomla database, in text editor for each marker, the variable to select the record from the table could be inserted in the title box of the marker.
How could I do this?
Within my text editor (JCE) I can insert PHP code, but do not know how to call the data from my table using the field "title" of the marker form as a variable.
Can you help me with that?
Thank you and best regards
Fernando
Please Log in or Create an account to join the conversation.
Less
More
-
Posts: 4609
-
Thank you received: 460
-
-
-
-
-
10 years 5 months ago #3984
by Dima
Hi
You can't change title.
You can suppress title and description (by setting infowin content placemark property), and call in Addition HTML field iframe tag. And in iframe tag you can call php file to get your database data, simple read from database table by joomla (you can find a lot of examples in internet), simple reading data from table - you can see in models folder of extension
Please Log in or Create an account to join the conversation.
Less
More
-
Posts: 9
-
Thank you received: 0
-
-
10 years 5 months ago #3994
by racetech
Hi Dima, thanks for the help.
I tried to do as you told me, inserting the php code with MySql query in Adition HTML Text Editor of ZhGoogleMaps of Mark, but do not working. I tried with two different plugins, DirectPHP and Sourcerer.
In the infoWin of the Mark on the map in the frontend, shows the php code, not the result of the MySql query.
Do you have any ideas to help me?
Thanks and best regards,
Fernando
Please Log in or Create an account to join the conversation.
Less
More
-
Posts: 4609
-
Thank you received: 460
-
-
-
-
-
10 years 5 months ago - 10 years 5 months ago #3995
by Dima
Hi Fernando
I didn't suggest you to insert php call into Addition HTML. It is different program languages!
I suggest you:
1 - create php file, add into it joomla's call database query and storing data into array or record (load object or load object list) like this I do for loading paths, look at function source
$id = $this->getState('map.id');
$db = JFactory::getDBO();
$query = $db->getQuery(true);
$query->select('h.*, c.title as category ')
->from('#__zhgooglemaps_paths as h')
->leftJoin('#__categories as c ON h.catid=c.id')
->where('h.published=1 and h.mapid='.(int)$id);
$db->setQuery($query);
// Paths
if (!$this->paths = $db->loadObjectList())
{
$this->setError($db->getError());
}
2 - and in your file as a result put echo with HTML resutl code
3 - call this file in iframe, in this case your code will be added into content
Last edit: 10 years 5 months ago by Dima.
Please Log in or Create an account to join the conversation.
-
Zh GoogleMap
-
Component
-
creating form on marker
Time to create page: 0.070 seconds