Required field for organizers e-mail address

Home Forums Calendar Products Community Events Required field for organizers e-mail address

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #1322619
    Ingo Buschmann
    Participant

    Hello there,
    I would like to make the organizers e-mail address field required. I read the tutorial but I don’t really know where to add this code:

    add_filter( 'tribe_events_community_required_organizer_fields', 'my_organizer_community_required_fields', 10, 1 );
    
    function my_organizer_community_required_fields( $fields ) {
        
        if ( ! is_array( $fields ) ) {
            return $fields;
        }
    
        $fields[] = 'email';
    
        return $fields;
    } 

    Can someone please help me out with this?

    Thank you!

    #1323233
    Patricia
    Member

    Hey Ingo,

    Thanks for contacting us!

    You can add this code in your theme’s functions.php file. (path: wp-content/themes/[your-theme]/functions.php)

    Let me know if this custom code works for you.

    Regards,

    Patricia

    #1323236
    Ingo Buschmann
    Participant

    Hi Patricia,

    this code didn’t work for me so I tried another code someone posted in another thread.
    The problem with the required field was solved but if i type in a valid e-mail address I always get the error message “Required field”.

    #1323756
    Patricia
    Member

    Hi Ingo,

    Can you please share with us the code you are using to set the email as a required field?

    This will help us to identify the cause of the issue you are experiencing.

    Regards,

    Patricia

    #1323804
    Ingo Buschmann
    Participant

    Hi Patricia,

    I used this code from another thread

    add_filter( 'tribe_events_community_required_fields', 'mark_twain_country_event_required_fields', 10, 1 );
    function mark_twain_country_event_required_fields( $fields ) {   
        if ( ! is_array( $fields ) ) {
            return $fields;
        }
        $fields[] = 'Organizer';
        $fields[] = 'Email';
        return $fields;
    } 

    Best regards,
    Ingo

    #1324377
    Patricia
    Member

    Hi Ingo,

    This is just a quick follow up to let you know that we are reviewing this code.

    We will return to you as soon as we have further information on this!

    Regards,

    Patricia

    #1325479
    Patricia
    Member

    Hey Ingo,

    You will be able to make the organizer’s e-mail field required by adding the following snippet in your theme’s functions.php file:

    https://gist.github.com/nefeline/78246d43adcd1b90a31eafb5a5e17cbe

    Please note that this solution sets both organizer and organizer’s e-mail address as required fields.

    Can you please let us know if this code works for you as expected?

    Regards,

    Patricia

    #1325812
    Ingo Buschmann
    Participant

    Hello Patricia,

    it worked! Thank you! 🙂

    #1325991
    Patricia
    Member

    Hey Ingo,

    Good to know it worked as expected!

    Let us know if you need anything else and have a great week!

    Regards,

    Patricia

    #1336080
    Support Droid
    Keymaster

    Hey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.

    Thanks so much!
    The Events Calendar Support Team

Viewing 10 posts - 1 through 10 (of 10 total)
  • The topic ‘Required field for organizers e-mail address’ is closed to new replies.