Home › Forums › Calendar Products › Community Events › Required field for organizers e-mail address
- This topic has 10 replies, 2 voices, and was last updated 6 years, 8 months ago by Ingo Buschmann.
-
AuthorPosts
-
July 18, 2017 at 7:18 am #1322619Ingo BuschmannParticipant
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!
July 19, 2017 at 7:00 am #1323233PatriciaMemberHey 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
July 19, 2017 at 7:05 am #1323236Ingo BuschmannParticipantHi 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”.July 20, 2017 at 5:18 am #1323756PatriciaMemberHi 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
July 20, 2017 at 6:54 am #1323804Ingo BuschmannParticipantHi 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,
IngoJuly 21, 2017 at 8:59 am #1324377PatriciaMemberHi 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
July 24, 2017 at 2:22 pm #1325479PatriciaMemberHey 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
July 25, 2017 at 9:34 am #1325812Ingo BuschmannParticipantHello Patricia,
it worked! Thank you! 🙂
July 25, 2017 at 1:07 pm #1325991PatriciaMemberHey Ingo,
Good to know it worked as expected!
Let us know if you need anything else and have a great week!
Regards,
Patricia
August 16, 2017 at 9:35 am #1336080Support DroidKeymasterHey 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 -
AuthorPosts
- The topic ‘Required field for organizers e-mail address’ is closed to new replies.