Skip to content

Instantly share code, notes, and snippets.

Created Jun 23, 2021
What would you like to do?
jQuery(document).ready(function ($) {
$ ('#spco-go-to-step-payment_options-submit').on('click', function (e) {
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
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 ();
alert ('You have already registered for this run with this email address. Please use a different email address or contact us at');
error: function ()
alert ('An error has occurred. Please contact us at');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment