Event Submission – Make Date & Time Required

Home Forums Calendar Products Community Events Event Submission – Make Date & Time Required

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #1218261
    Chris
    Participant

    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

    #1218450
    Cliff
    Member

    Hi, 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.

    #1229490
    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 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Event Submission – Make Date & Time Required’ is closed to new replies.