Select a Country Defaults

Home Forums Calendar Products Community Events Select a Country Defaults

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #905532
    avonnes
    Participant

    Need to limit the “Select a Country” dropdown list to only the U.S. It looks like the correct template file is ‘event-form.php’ Is the following code correct?

    <script type=”text/javascript”>
    jQuery(document).ready(function() {
    jQuery(‘#EventCountry’).val(‘United States’);
    });
    </script>

    Do I include this script block in the ‘event-form.php’ file or do I need to perform a template override?

    #905765
    Brian
    Member

    Hi,

    I can try to help on this customization.

    There are bunch of different templates that coding might go on. I would look in this directory starting with this file:

    \wp-content\plugins\the-events-calendar-community-events\views\community\edit-event.php

    You can follow the Themer’s Guide it will show you where to move the files to your theme to safely edit them:

    https://theeventscalendar.com/support/documentation/events-calendar-themers-guide/

    Not sure if that coding will work, it looks correct, but I think it will keep all the other countries there.

    You may not need it though as you can set the default country for the dropdown here:

    Events > Settings > Default Content > Default country Field

    Let me know if you have any follow up questions.

    Thanks

    #932203
    Brian
    Member

    Since there is has not been any activity on this thread for over 2 weeks so I am now closing it. Feel free to start a new thread if you have further issues. Thanks! 🙂

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Select a Country Defaults’ is closed to new replies.