Question regarding: $countries array in tribe-view-helpers class.php

Home Forums Calendar Products Events Calendar PRO Question regarding: $countries array in tribe-view-helpers class.php

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #794340
    Tran
    Participant

    Hello,

    I am working on a customization and would like some information on how the $countries variable logs the value of the select dropdown in the front end.

    Basically, I am trying to use jQuery to either hide or show an element on the Add Events page – based on the value of the country selected in the Country dropdown…

    The code I am using here:

    <script> $(‘select[name=venue[Country]]’).change(function () {
    if ($(this).val() == ‘Canada’) { $(‘#StateProvinceSelectCAN’).show();
    } else { $(‘#StateProvinceSelectCAN’).hide();
    }
    });
    </script>

    However, this script is not working. I was wondering what the proper value structure is for the $countries array, is it
    [0] – starting at “Select a country:”
    [1] – “United States”
    [2] – “Afghanistan” …. etc

    Or are the values the:
    “US”
    “AF”
    “AL”
    I have tried to manually count out the numerical value for ‘Canada’ in the list which is 39 or 40, and tried this method to no success – Ive also tried “Canada” as the value in my jQuery script – with no success either.

    Any help on this issue would be greatly appreciated.

    Thanks

    #794596
    Tran
    Participant

    Figured this out. Thanks.

    #794611
    Brian
    Member

    Ok, closing out the ticket, glad you figured it out.

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Question regarding: $countries array in tribe-view-helpers class.php’ is closed to new replies.