Events Manager booking form required fields
-
First of all thank you for this amazing plugin!
I was trying to make the “name field” & “phone field” in the events booking form a required field as well and I managed to look for some answers from here –> https://www.ads-software.com/support/topic/booking-form-required-fields?replies=13. Have also added the below codes into my child theme functions.php. On the event page (with the booking form), after clicking on the “Send your booking”, error message still shows only “ERROR: Please type your e-mail address.”. Is there any steps I’m missing here? Could anyone point in the right direction? Btw, I’m using the free version as I do not required payment features in the pro version.
Thanks a lot and very much appreciate your time and help.
function em_validate($result, $EM_Event){ if (!is_user_logged_in() && $_REQUEST['user_name'] == ''){ $EM_Event->add_error('Your Name is Required...'); $result = false; } if (!is_user_logged_in() && $_REQUEST['dbem_phone'] == ''){ $EM_Event->add_error('Your Contact Number is Required...'); $result = false; } if (!is_user_logged_in() && $_REQUEST['user_email'] == ''){ $EM_Event->add_error('Your Email is Required...'); $result = false; } return $result; } add_filter('em_event_validate','em_validate', 1, 2);
- The topic ‘Events Manager booking form required fields’ is closed to new replies.