Hi Frank, I appreciate your quick response. I’m not that experience with php or with your plugin. Can you elaborate more how do I apply the eme_eval_booking_form_post_filter? I already checked the link that you gave but Im not sure if what I did is correct. I added this to the eme_filters.php
add_filter(’eme_eval_booking_post_filter’,’do_my_stuff’);
function do_my_stuff($event) {
$event_id=$event[‘event_id’];
$already_registered=0;
// only do a specific event
if ($event_id != 5) return;
// get all attendees
$attendees = eme_get_attendees_for($event_id);
foreach ( $attendees as $attendee ) {
// $attendee[‘person_email’], $attendee[‘person_name’]
$bookerEmail = eme_sanitize_html(stripslashes_deep($_POST[‘bookerEmail’]));
$bookerName = eme_sanitize_html(stripslashes_deep($_POST[‘bookerName’]));
if ($bookerEmail == $attendee[‘person_email’] && $bookerName == $attendee[‘person_name’])
$already_registered=1;
}
if (!$already_registered) {
// eval is success
return array(0=>1,1=>”);
} else {
// bad form entry
return array(0=>0,1=>’Already registered’);
}
}
but when I tried running it, it did not run the filter? Do I need to add “eme_eval_booking_form_post_filter” somewhere? Sorry for the newbie question.