Facing problems with custom address fields
-
Hey Aurovrata,
First of all I want to say ‘thank you‘ for this great plugin. I will definitely donate something, because I expect it to work cool after doing some ground work and also further investigations in the market.But still I am experiencing troubles with it, especially with jQuery, as I am not able to configure everything as I would like to. Here is the page LINK. Following things I would like to achieve:
- I would like to include the map in SATELLITE format but I simply do not know where to implement the ‘add_filter’ in script
- I would like to adjust the map controls, but I simply do not know where to implement the ‘add_filter’ in script
- I would like to separate street and number in custom address fields
- I would like to have changes within custom address fields affecting also the map (vice versa), so if you change the street and number the marker automatically changes its position
- I would like to re-order street name + number (name first, number after and without commas).
- I would like to bring values from custom address fields into email notification
- I would like to bring the selected map with centered pin into the email notification as a screenshot/built-in image.
This is how my code looks like currently:
<p>[map your-location "zoom:18;clat:12.007117348757749;clng:79.8107937265215;lat:12.007089;lng:79.810600"] <p id="line">Street + number [text your-address-line]</p> <p id="pincode">ZIP Code [text your-address-pin]</p> <p id="city">City [text your-address-city]</p> [submit "Submit"] <script type="text/javascript"> (function($){ $(document).ready( function(){ $('.cf7-google-map-container.your-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#line input').val(e.address.line); $('p#pincode input').val(e.address.pin); $('p#city input').val(e.address.city); //Adjust map settings add_filter('cf7_google_map_default_type', 'change_map_type', 10,2); function change_map_type($type, $field){ //type must be either ROADMAP/SATELLITE/TERRAIN/HYBRID. if('your-location' ==$field) $type = 'SATELLITE'; return $type; } //Adjust map controls dd_filter('cf7_google_map_settings', 'use_custom_map_settings',10,2); function use_custom_map_icon($settings, $field_name){ if( 'your-location' == $field_name ){ $settings['mapTypeControl']= false; //hide (true by default). $settings['navigationControl']= false; //hide (true by default). $settings['streetViewControl']= false; //hide (true by default). $settings['zoomControl']=true; //show (false by default). $settings['rotateControl']=true; //show (false by default). $settings['fullscreenControl']=false; //hide (false by default). $settings['rotateControl']= true; //show (false by default). $settings['zoom']= 18; //set by default to the value initialised at the time of creating the form tag. $settings['center'] = array('11.936825', '79.834278'); //set by default to the value initialised at the time of creating the form tag. } return $settings; } }) }) })(jQuery) </script>
I kindly request some help regarding my chaos :-/
Thanks a lot!
- This topic was modified 2 years, 10 months ago by .
- This topic was modified 2 years, 10 months ago by .
The page I need help with: [log in to see the link]
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Facing problems with custom address fields’ is closed to new replies.