Changing the Event Description to NOT required

Home Forums Calendar Products Events Calendar PRO Changing the Event Description to NOT required

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #962804
    sean
    Participant

    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?

    #962864
    George
    Participant

    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

    #962903
    sean
    Participant

    Great, thank you!

    #963639
    George
    Participant

    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

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Changing the Event Description to NOT required’ is closed to new replies.