WordPress.org

Ready to get started?Download WordPress

Forums

Events Manager
[resolved] Change required fields in registration form (3 posts)

  1. GOEDvandoen
    Member
    Posted 1 year ago #

    How to make the telephone field in de registration form also a required field just like the name and email field?

    Super nice plugin btw.

    Cheers

    http://wordpress.org/extend/plugins/events-manager/

  2. agelonwl
    Member
    Posted 1 year ago #

  3. Marcus
    NetWebLogic Support
    Plugin Author

    Posted 1 year ago #

    the Pro add-on makes this pretty easy with our form builder, but to make it required using only the main plugin requires some PHP.

    I'll write this out here but it's off the top of my head, so there may be mistakes, but it's a general gist of it:

    function my_em_validation($result, $EM_Booking){
      if(!empty($_REQUEST['dbem_phone'])){
        $EM_Booking->add_error('enter a phone number');
        $result = false;
      }
      return $result;
    }
    add_filter('em_booking_validate','my_em_validation');

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic