“;
let msgArea = $(‘#submitMsg’);
let kids = document.querySelectorAll(“.kid”);
let acceptedIndexesKeep = [1, 3];
$(“input[type=submit]”).prop(“disabled”, true);
if (adViewport == “mobile”) {
$(“.size1of2”).removeClass(“size1of2”);
$(“.size1of3”).removeClass(“size1of3”);
}
$(“.add-row1”).on(“click”, function (e) {
e.preventDefault();
$(“.second-kid”).removeClass(‘hide’).show();
$(“.add-row2”).removeClass(‘hide’).show();
$(this).addClass(‘hide’);
});
$(“.add-row2”).on(“click”, function (e) {
e.preventDefault();
$(“.third-kid”).removeClass(‘hide’).show();
$(this).addClass(‘hide’);
});
$(“input#acceptTerms”).on(“change”, function () {
if (checkFields()) {
msgArea.html(”);
$(“input[type=submit]”).prop(“disabled”, false);
} else {
$(this).prop(‘checked’, false);
$(“input[type=submit]”).prop(“disabled”, true);
msgArea.html(”);
msgArea.html(makeList(msgArray));
}
});
$(document).on(‘change’, ‘#mce-YOB1, #mce-YOB2, #mce-YOB3’, function () {
manageDateSelectors($(this));
})
$(document).on(‘click’, ‘.resetKid’, function () {
let theParent = $(this).parents(‘.kid’);
console.log(theParent);
if (theParent.hasClass(‘second-kid’)) {
$(‘.first-kid .add-row1’).removeClass(‘hide’)
}
if (theParent.hasClass(‘third-kid’)) {
$(‘.second-kid .add-row2’).removeClass(‘hide’)
}
theParent.find(‘input, select’).val(”);
theParent.find(‘input[type=checkbox]’).prop(“checked”, false);
theParent.find(‘.scoringLabmsg’).html(”);
theParent.hide();
});
$(document).on(‘change’, ‘.theCamps input’, function () {
manageCampsSelectors($(this));
});
kids.forEach(function (kid) {
let periodSelects = kid.querySelectorAll(“.periodSelect”);
let keepElement = kid.querySelector(“.keep”);
periodSelects.forEach(function (select) {
$(document).on(“change”, select, function () {
console.log(“change”);
let hasSelectedIndex = Array.from(periodSelects).some(function (select) {
return acceptedIndexesKeep.includes(select.selectedIndex);
});
if (hasSelectedIndex) {
keepElement.style.display = “inline-block”;
} else {
keepElement.style.display = “none”;
}
});
});
});
function manageDateSelectors(el) {
let yob = $(el).val();
console.log(‘yob = ‘ + yob);
let kidContainer = $(el).parents(‘.kid’);
kidContainer.find(‘.theCamps input’).each(function (i, el) {
console.log($(el).data(‘min-yob’));
console.log($(el).data(‘max-yob’));
if (yob > $(el).data(‘max-yob’) || yob < $(el).data(‘min-yob’)) {
$(el).prop(“checked”, false).prop(“disabled”, true);
} else {
$(el).prop(“disabled”, false);
}
});
manageCampsSelectors(el)
}
function manageCampsSelectors(el) {
console.log(el);
let kidContainer = el.parents(‘.kid’);
//hide all the options
kidContainer.find(‘.periodSelect’).val(”);
kidContainer.find(‘.periodSelect option’).show();
kidContainer.find(‘.periodSelect option:not(:first-child)’).hide();
kidContainer.find(‘.theCamps input:checked’).each(function (i, el) {
kidContainer.find(‘.periodSelect option.’ + $(el).data(‘camp’)).prop(“disabled”, false).show();
});
kidContainer.find(‘.theCamps input:not(:checked)’).each(function (i, el) {
kidContainer.find(‘.periodSelect option.’ + $(el).data(‘camp’)).prop(“disabled”, true).hide();
});
kidContainer.find(‘.periodDiv1 .osl’).prop(‘disabled’, true);
kidContainer.find(‘.periodDiv2 .osl’).prop(‘disabled’, true);
kidContainer.find(‘.periodDiv1 .sl’).prop(‘disabled’, true);
}
function checkFields() {
msgArray = [];
let result = true;
//check parent fields
if ($(“#mce-EMAIL”).val() == ” || $(“#mce-EMAIL”).val() !== $(“#rep-email”).val()) {
msgArray.push(“Please confirm your email”);
result = false;
}
//check first kid fields
if ($(‘#mce-PER1KID1’).val() == ” && $(‘#mce-PER2KID1’).val() == ” && $(‘#mce-PER3KID1’).val() == ” && $(‘#mce-PER4KID1’).val() == ”) {
msgArray.push(“Please choose period/program”);
result = false;
}
if ($(‘.first-kid .keep’).css(‘display’) != ‘none’ && $(‘.first-kid .keep select’).val() == ”) {
msgArray.push(“Please choose if you wish child care”);
result = false;
}
if ($(‘.first-kid .tshirt’).css(‘display’) != ‘none’ && $(‘.first-kid .tshirt select’).val() == ”) {
msgArray.push(“Please choose a T-shirt size”);
result = false;
}
//check second kid fields
if ($(‘.second-kid’).css(‘display’) == ‘block’) {
if ($(‘#mce-PER1KID2’).val() == ” && $(‘#mce-PER2KID2’).val() == ” && $(‘#mce-PER3KID2’).val() == ” && $(‘#mce-PER4KID2’).val() == ”) {
msgArray.push(“Please choose period/program for the second child”);
result = false;
}
if ($(‘.second-kid .keep’).css(‘display’) != ‘none’ && $(‘.second-kid .keep select’).val() == ”) {
msgArray.push(“Please choose if you wish child care for the second child”);
result = false;
}
if ($(‘.second-kid .tshirt’).css(‘display’) != ‘none’ && $(‘.second-kid .tshirt select’).val() == ”) {
msgArray.push(“Please choose a T-shirt size for the second child”);
result = false;
}
}
//check third kid fields
if ($(‘.third-kid’).css(‘display’) == ‘block’) {
if ($(‘#mce-PER1KID3’).val() == ” && $(‘#mce-PER2KID3’).val() == ” && $(‘#mce-PER3KID3’).val() == ” && $(‘#mce-PER4KID3’).val() == ”) {
msgArray.push(“Please choose period/program for the third child”);
result = false;
}
if ($(‘.third-kid .keep’).css(‘display’) != ‘none’ && $(‘.third-kid .keep select’).val() == ”) {
msgArray.push(“Please choose if you wish child care for the third child”);
result = false;
}
if ($(‘.third-kid .tshirt’).css(‘display’) != ‘none’ && $(‘.third-kid .tshirt select’).val() == ”) {
msgArray.push(“Please choose a T-shirt size for the third child”);
result = false;
}
}
if ($(“.marketing input:checkbox:checked”).length == 0) {
msgArray.push(“Please provide an answer on how you heard about the Camp”);
result = false;
}
return result;
}
function makeList(data) {
let sub_ul=”
“;
sub_ul += “- ” + data.join(“
- “) + “
“;
sub_ul += ‘
‘
// console.log(sub_ul);
return sub_ul;
}
}(jQuery))
var the_event=”SummerCamp2026FormEN”;
var the_word = ‘Thank you’;
Contact
🏟 Leoforos Marathonos 1, Anixi | Arsakeia – Tositseia Schools of Ekali
☎ 210 800 2957
📧 academy@eurohoops.net