Help Desk

Changing the Event Description to NOT required

  • Posts: 25 Topics: 14
    | Permalink

    By default, the Event Title and Event Description are required when submitting an event via the Community Events add-on. I’m aware of the potential to ADD required fields (via the tutorial at https://theeventscalendar.com/knowledgebase/required-fields-for-events-submission-form/). However, is it possible to REMOVE a field that the plugin requires by default, such as post_content? Or would doing so cause issues? Thanks.

    PS – Any ETA for version 3.10?

    Posts: 10476 Topics: 3
    | Permalink

    Hi Sean,

    We’re hoping to get 3.10 out the door in a matter of weeks, though at this time I do not have a specific launch date to share.

    As for making the Event Description field optional, you can definitely do this! Try adding the following code to your theme’s functions.php file:

    add_filter( 'tribe_events_community_required_fields', 'tribe_962804_make_community_desc_optional' );
    
    function tribe_962804_make_community_desc_optional( $required_fields ) {
    	
    	foreach ( $required_fields as $key => $field_name ) {
    		if ( 'post_content' == $field_name ) {
    			unset( $required_fields[ $key ] );
    		}
    	}
    
    	return $required_fields;
    }
    

    Let us know if that helps!

    โ€” George

    Posts: 25 Topics: 14
    | Permalink

    Great, thank you!

    Posts: 10476 Topics: 3
    | Permalink

    Glad it helped! Be sure to make backups of your site and database as you play around with custom code like this โ€“ย and just in general, too, I guess ๐Ÿ™‚

    Best of luck with your site!

    George

The topic ‘Changing the Event Description to NOT required’ is closed to new replies.