Home › Forums › Calendar Products › Community Events › Organizer required filter not working
- This topic has 3 replies, 4 voices, and was last updated 9 years, 9 months ago by
Daniel.
-
AuthorPosts
-
June 19, 2016 at 4:45 pm #1129073
Daniel
ParticipantI’m experiencing the same problem described above. After the upgrade to Community Events 4.2 the required filter that I’ve been using in my functions file stopped working.
Here’s the filter I’ve been using:
/*The Events Calendar Community Events Required Fields */ add_filter( 'tribe_events_community_required_fields', 'my_community_required_fields', 10, 1 ); function my_community_required_fields( $fields ) { $fields = array( 'post_title', 'post_content', 'EventStartDate', 'venue', 'organizer', ); // Requiring the organizer email (or other "square bracketed" // fields) can't be done using the above approach, but we can // simply test within the $_POST superglobal directly. // // If a field hasn't been populated then we simply add a requirement // using a field name we know doesn't exist, but can be used to form // a meaningful error message (if the org email is missing the user // will see "Organizer Email is required"). // // You could take this a step further and additionally validate the // email field to ensure it looks like a valid email address and // provide an alternative error using the same approach. if ( empty( $_POST['organizer']['Email'] ) ) $fields[] = 'Organizer Email'; return $fields; }It’s been working flawlessly before upgrading to 4.2
June 21, 2016 at 12:37 pm #1130033Geoff B.
MemberGood afternoon Daniel and welcome back!
Thank you for reaching out to us.
We are sorry to hear about the organizer field no longer being required on your site.
I would love to help you with this topic.As a first troubleshooting step, could you please provide us with your complete system information in a private reply using the instructions found in the following link?
https://theeventscalendar.com/knowledgebase/sharing-sys-info/
I tried to reproduce the issue by adding the exact same snippet on my install (with the twenty-fifteen theme).
I then tried submitting an event without an organizer and received the following validation message “Organizer is required”.Is that what you are getting as well on your end ? If not, could you shed some light (or perhaps share a link to your “Submit an Event” page for your site) on what the experience looks like on your end ?
Best regards,
Geoff B.
July 6, 2016 at 9:35 am #1136054Support Droid
KeymasterThis topic has not been active for quite some time and will now be closed.
If you still need assistance please simply open a new topic (linking to this one if necessary)
and one of the team will be only too happy to help. -
AuthorPosts
- The topic ‘Organizer required filter not working’ is closed to new replies.
