Home › Forums › Calendar Products › Community Events › Event Submission – Make Date & Time Required
- This topic has 3 replies, 4 voices, and was last updated 7 years, 2 months ago by Chris.
-
AuthorPosts
-
January 13, 2017 at 11:53 am #1218261ChrisParticipant
Hi,
I am following the themer’s guide and the “Required Fields for Events Submission Form” page (https://theeventscalendar.com/knowledgebase/required-fields-for-events-submission-form/)I was able to make the Event Website URL required, but Event Date & Time I cannot. Does anyone know why?
I tried the following. I got the fields from the IDs of the input fields:
add_filter( 'tribe_events_community_required_fields', 'my_community_required_fields', 10, 1 ); function my_community_required_fields( $fields ) { if ( ! is_array( $fields ) ) { return $fields; } $fields[] = 'EventURL'; $fields[] = 'EventStartDate'; $fields[] = 'EventStartTime'; $fields[] = 'EventEndTime'; $fields[] = 'EventEndDate'; return $fields; }
Please let me know. Thank you
January 13, 2017 at 4:12 pm #1218450CliffMemberHi, Chris.
You can see the fields that are required by default starting at Line 1721 of /wp-content/plugins/the-events-calendar-community-events/src/Tribe/Main.php:
'post_content', 'post_title', 'EventStartDate', 'EventStartTime', 'EventEndDate', 'EventEndTime',
I tested and these are required even though there’s no red asterisk next to them. However, since the dates and times are auto-filled, it wouldn’t trigger the error message unless the user would remove the defaults.
Please let me know if this answers your question.
February 4, 2017 at 8:35 am #1229490Support 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 ‘Event Submission – Make Date & Time Required’ is closed to new replies.