Home › Forums › Calendar Products › Community Events › Make Google Maps mandatory
- This topic has 14 replies, 5 voices, and was last updated 9 years, 1 month ago by
Riza.
-
AuthorPosts
-
January 20, 2017 at 7:18 am #1221488
Riza
ParticipantHow can I make the Google Maps options on Locations on the community/add form mandatory. i.e. pre-tick them?
I’m even considering hiding the options if I can have them selected always.
January 20, 2017 at 4:15 pm #1221787Hunter
ModeratorHello 🙂
Our Required Fields for Events Submission Form tutorial provides the information you’ll need to make the Google Maps options mandatory. Please let me know how it works out!
January 21, 2017 at 3:37 am #1221852Riza
ParticipantIt works but not fully. My code is below.
// Check required event fields add_filter( 'tribe_events_community_required_fields', 'my_community_required_fields', 10, 1 ); function my_community_required_fields( $fields ) { if ( ! is_array( $fields ) ) { return $fields; } $fields[] = 'venue'; $fields[] = 'EventShowMapLink'; return $fields; }From what I understand and what logic says, if there is no venue selected nor entered I should get an error for that. In fact even though there is no venue selected nor entered I only get the “Event Show Map Link is required” error message. I tried to change the order of the fields line but nothing has changed.
I still need your help.
BTW, thank you for the excellent support.
January 23, 2017 at 8:26 pm #1222743Hunter
ModeratorHello,
You are correct – it doesn’t appear to be possible setting the venue map boxes to be checked by default using the code from the tutorial I linked to above. After doing more research, it’s going to be more time-consuming than I originally thought, so I’ve brought in another support team member to help. Feel free to reply in ~24 hours and hopefully I’ve got something functional for you by then.
I also recommend submitting this as a feature request to our UserVoice Feature Ideas page. I can see the benefit of having the option in the Events settings allowing either/or both boxes checked/unchecked by default on the Community Events Add event form.
Thanks and I’ll keep an eye on my queue for your response. Enjoy your evening!
January 25, 2017 at 2:53 am #1223471Riza
ParticipantFeel free to reply in ~24 hours and hopefully I’ve got something functional for you by then.
Here I am 🙂
January 26, 2017 at 11:04 am #1224551Hunter
ModeratorThank you for your patience. We have actually chosen your request to be built as a new Extension, so please hang tight while we get it coded. It shouldn’t be more than a day or two and once it’s finished I’ll be sure and share a link so you can download it.
Thanks again and I’ll keep you updated. Cheers!
February 5, 2017 at 5:02 am #1229662Riza
ParticipantAny progress on this?
February 6, 2017 at 11:44 pm #1230384Hunter
ModeratorMy apologies! Our queue has been a little crazy lately which has taken priority over Extensions. I’m nearly finished with the coding, I’ll be sure and get it wrapped up tomorrow afternoon. Ping me again and I should have it for you. Thanks again so much for your patience!
February 22, 2017 at 6:57 am #1243694Riza
ParticipantPing? 🙂
February 24, 2017 at 7:46 am #1245206Riza
ParticipantHi there
I want to try the extension but I’m confused to where I can access it. There was no attachment to this email nor I ca see this email on the thread on the support site.
February 24, 2017 at 1:59 pm #1245498Hunter
ModeratorYou can disregard that message you saw come through – I had replied with incorrect information. We’re still working on the Extension, so for the time being you can try the following snippet. It ignores the selection for those settings, always showing a map when one is available regardless of what users checked:
/**
* Causes calendar to always show Google Map and Link, regardless of individual event settings
*/
add_filter( 'tribe_embed_google_map', '__return_true' );
add_filter( 'tribe_show_google_map_link', '__return_true' );Thanks again for your continued patience while we sorted things out. Let me know if it works and have a great weekend ahead!
February 26, 2017 at 3:18 pm #1246074Lars
ParticipantThis reply is private.
February 28, 2017 at 3:38 pm #1247256Hunter
Moderator@Lars, you would add that code to the bottom of your theme’s functions.php file. Please give it a shot and if you run into any issues, create a separate thread and we’d be happy to help further assist.
In response to the other issue you’ve mentioned, you’ll need to create a new thread as we are not able to mix up thread topics. Thanks and I’ll keep an eye on the queue for your thread. Cheers!
March 22, 2017 at 9:35 am #1258113Support Droid
KeymasterHey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.
Thanks so much!
The Events Calendar Support Team -
AuthorPosts
- The topic ‘Make Google Maps mandatory’ is closed to new replies.
