Show Google Maps and Google Maps Link by Default

Home Forums Calendar Products Community Events Show Google Maps and Google Maps Link by Default

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #1062647
    Eric Reynolds
    Participant

    How can events automatically display Google maps and Google maps link by default? I know how to hid the fields on the submission form via CSS, I just don’t know how to enable the settings by default so that all submissions automatically display the map and link.

    🙂 Eric

    #1063189
    Nico
    Member

    Hi Eric,

    Thanks for reaching out to us! I’ll help you settings this up 🙂

    I guess the simpler way is to edit the venue form template and mark those inputs as checked per default. As they are not being displayed to the user they won’t be able to uncheck those. Before I describe the process please be sure to check our Themer’s guide to get an idea of how template overrides work.

    You’ll need to override the venue.php template located at wp-content/plugins/the-events-calendar-community-events/src/Tribe/views/community/modules/. Once you have the copy of the file placed correctly in your theme (or child theme) folder, you’ll need to do the following edits:


    // change line 185
    <input type="checkbox" id="EventShowMapLink" name="EventShowMapLink" value="1" <?php checked( $venue_show_map_link ); ?> />
    // whith this
    <input type="checkbox" id="EventShowMapLink" name="EventShowMapLink" value="1" checked />

    // change line 200
    <input type="checkbox" id="EventShowMap" name="EventShowMap" value="1" <?php checked( $venue_show_map ); ?> />
    // whith this
    <input type="checkbox" id="EventShowMap" name="EventShowMap" value="1" checked />

    This should do the trick! If you prefer not to edit the template we can do this in other ways, via JS or hooking up to some actions that happened after the event is submitted/edited.

    Please let me know about it,
    Best,
    Nico

    #1078902
    Support Droid
    Keymaster

    This topic has not been active for quite some time and will now be closed.

    If you still need assistance please simply open a new topic (linking to this one if necessary)
    and one of the team will be only too happy to help.

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Show Google Maps and Google Maps Link by Default’ is closed to new replies.