Forum Replies Created

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter tuomi90

    (@tuomi90)

    OMG… :facepalm: now I see my mistake. Thank You very much. Your’e the best plugin maker for me ?? You are very very helpful for guys who use Your plugins. Yes, I use SGl. It’s very helpful plugin for create forms, but I see a little trouble. If I use this plugin, I cannot use JavaScript in the forms, because it’s not working correctly. (It od possible that I use this plugin in a wrong way.)

    Thread Starter tuomi90

    (@tuomi90)

    I checked all, and should be working (I think).

    Here You have a new code from my form (admin view):

    <div>Adres <b><u>docelowy</u></b>*<br>
    <!-- map for destination place -->
    [map destiny-location custom_address "zoom:14;clat:49.98591598309408;clng:21.949909645507827;lat:49.986586;lng:21.949223"]
    <!-- field & script for destination place -->
    <p id="destadres">Adres [text destiny-address readonly "Adres miejsca docelowego (WYBIERZ Z MAPY)"]</p>
    </div>
    <script type="text/javascript">
    (function($){
    $(document).ready( function(){
    $('.cf7-google-map-container.destiny-location').on('update.cf7-google-map', function(e){
    //the event has 5 address fields, e.address.line, e.address.city, e.address.pin, e.address.state, e.address.country.
    //some fields may be empty.
    $('p#destadres input').val(e.address.line + e.address.pin +' '+ e.address.city);
    })
    })})(jQuery)
    </script>
    <div>Adres Twojego <b><u>aktualnego</u></b> pobytu
    <small>(pozostaw puste, je?eli startujemy z bazy)</small>
    <!-- map for current place -->
    [map current-location "zoom:15;clat:49.98986304426285;clng:21.952339743307892;lat:49.989093537451474;lng:21.952647882080072"]
    <!-- field & script for destination place -->
    <p id="curradres">Adres [text current-address readonly "Lubomirskiego 54, 36-040, Boguchwa?a"]</p>
    </div>
    <script type="text/javascript">
    (function($){
    $(document).ready( function(){
    $('.cf7-google-map-container.current-location').on('update.cf7-google-map', function(e){
    //the event has 5 address fields, e.address.line, e.address.city, e.address.pin, e.address.state, e.address.country.
    //some fields may be empty.
    $('p#curradres input').val(e.address.line + e.address.pin +' '+ e.address.city);
    })
    })})(jQuery)
    </script>

    As You can see for destiny I have a correct data and it good working.
    For current map & field I have a correct ID’s and parameters, but it’s not working.
    At this moment it’s not important. My collegues must set locations on the map, so I have a long & lat from their’s positions ??

    Thread Starter tuomi90

    (@tuomi90)

    Centering map on the point work perfect. But “writing address” in input field not working good. Is it possible that “function(e)” in “$(‘.cf7-google-map-container.map-name’).on(‘update.cf7-google-map’, function(e){” make a trouble for multiple maps?
    I tested it on one map and it perfect working.
    But if I add second map (I change map name and input field ID), for the first map it working good, but when I set point on second map, address is not show in the input field. if You want, You can check it on fifitrans.rgtv.pl.
    First map (which working) is under “Adres docelowy*” and second map (not working good) is under “Adres Twojego aktualnego pobytu”. Input fields is under of each maps.
    — edit —
    Maybe for every maps add an ID and for every “function(e)” add this id. Example: if ID is “map” – function(map_e). I know that its too much edit in plugin script for You, but I don’t have any ideas and knowledge of javascript for me is worst than my english .

    • This reply was modified 4 years, 5 months ago by tuomi90.
    • This reply was modified 4 years, 5 months ago by tuomi90.
    Thread Starter tuomi90

    (@tuomi90)

    Fantastic. I love it, but now I have a little problem with “user input address”.
    In my form I have:

    [map destiny-location custom_address "zoom:14;clat:49.98591598309408;clng:21.949909645507827;lat:49.986586;lng:21.949223"]
    <p id="destadres">Adres [text destiny-address]</p>
    </div>
    <script type="text/javascript">
    (function($){
    $(document).ready( function(){
    	$('.cf7-google-map-container.destiny-location').on('update.cf7-google-map', function(e){
    	//the event has 5 address fields, e.address.line, e.address.city, e.address.pin, e.address.state, e.address.country.
    	//some fields may be empty.
    	$('p#destadres input').val(e.address.line + e.address.pin +' '+ e.address.city);
    	})
    })})(jQuery)
    </script>

    and few lines down is a second map:

    [map current-location "zoom:15;clat:49.98986304426285;clng:21.952339743307892;lat:49.989093537451474;lng:21.952647882080072"]
    <br>
    <p id="curadres">Adres [text current-address]</p>
    </div>
    <script type="text/javascript">
    (function($){
    $(document).ready( function(){
    	$('.cf7-google-map-container.current-location').on('update.cf7-google-map', function(e){
    	//the event has 5 address fields, e.address.line, e.address.city, e.address.pin, e.address.state, e.address.country.
    	//some fields may be empty.
    	$('p#curadres input').val(e.address.line + e.address.pin +' '+ e.address.city);
    	})
    })})(jQuery)
    </script>

    I change ID for <p> (p#curadres) and for the map (cf7-google-map-container.current-location). For first map (destiny-location) it’s working perfect, but for “current-location” it not working, and I don’t know why. Can You tell me, what I do wrong? Sorry for my bad english.

    — edit —
    I found a small bug: if I have a two maps (as up: “destiny” and “current”) and I write address in first map, point is moved but map stay on last view. For the second map all work perfect.
    Sorry for make a problems for You.

    • This reply was modified 4 years, 5 months ago by tuomi90.
    • This reply was modified 4 years, 5 months ago by tuomi90.

    Hey Oleg!
    I have a suggestion regarding the display of members.
    You have already add the display in a square and a circle.
    I would suggest to add the display of both forms (circle and square), but on the principle of a scrolling list, as it is on the page:
    https://espotlight.emdplugins.com/?pk_campaign=knowledge-center-com&pk_kwd=readme#employee_carousel_4_emd_employee-cont
    in the subtitle “Meet IT department”
    or on te polish webpage https://gimnazjumboguchwala.pl/#bottom2-section
    in the “NASZA KADRA”.
    This would allow to display a large number of people in an interesting and at the same time space-saving way. Besides, the plugin is fantastic.
    Regards

Viewing 5 replies - 1 through 5 (of 5 total)