-
-
Save Pebblo/51510374b1f8cb91b8b4450a86ca8a6c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jQuery(document).ready(function ($) { | |
$ ('#spco-go-to-step-payment_options-submit').on('click', function (e) { | |
e.preventDefault(); | |
e.stopPropagation(); | |
var email = $('.ee-reg-qstn-email input').val(); | |
var event = $('.big-event-title-hdr').attr('id'); | |
event = event.substr(12); // this gets the event id from the heading id attribute | |
$.ajax( | |
{ | |
url: postdetails.ajax_url, | |
type: 'post', | |
data: { | |
action: 'my_action', | |
user_email: email, | |
event_id: event | |
}, | |
success: function (response) { | |
if (response == 'false') | |
{ | |
$ ('#ee-spco-attendee_information-reg-step-form'). submit (); | |
} | |
else | |
{ | |
alert ('You have already registered for this run with this email address. Please use a different email address or contact us at office@meinstartplatz.at.'); | |
} | |
}, | |
error: function () | |
{ | |
alert ('An error has occurred. Please contact us at office@meinstartplatz.at.'); | |
} | |
}); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment