Make Google Maps mandatory

Home Forums Calendar Products Community Events Make Google Maps mandatory

  • This topic has 14 replies, 5 voices, and was last updated 7 years ago by Riza.
Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #1221488
    Riza
    Participant

    How 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.

    #1221787
    Hunter
    Moderator

    Hello 🙂

    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!

    #1221852
    Riza
    Participant

    It 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.

    #1222743
    Hunter
    Moderator

    Hello,

    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!

    #1223471
    Riza
    Participant

    Feel free to reply in ~24 hours and hopefully I’ve got something functional for you by then.

    Here I am 🙂

    #1224551
    Hunter
    Moderator

    Thank 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!

    #1229662
    Riza
    Participant

    Any progress on this?

    #1230384
    Hunter
    Moderator

    My 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!

    #1243694
    Riza
    Participant

    Ping? 🙂

    #1245206
    Riza
    Participant

    Hi 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.

    #1245498
    Hunter
    Moderator

    You 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!

    #1246074
    Lars
    Participant

    This reply is private.

    #1247256
    Hunter
    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!

    #1258113
    Support Droid
    Keymaster

    Hey 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

Viewing 14 posts - 1 through 14 (of 14 total)
  • The topic ‘Make Google Maps mandatory’ is closed to new replies.