Easy way to make description not required.

Home Forums Calendar Products Community Events Easy way to make description not required.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1128209
    Ben
    Participant

    Hi Cliff, I looked at the reference describing how to add new required fields to the Community Events form, but I think it is overlay complex for what I need. I simply want to remove the requirement to enter a description when it is not needed/wanted. Most events don’t need this field, and it’s a pain to have to input something that is not needed/relevant. Is there a simple way to make the description field an optional field that directly without getting into how to add more required fields? Thanks, Gene

    #1128921
    Ben
    Participant

    I added the following code to the end of my Illustrious theme’s functions file. The entire file is below. It isn’t working–I get a bunch of errors, also below. Could you point me to the place where the required files are defined in the Community Events plugin?

    <?php if(!isset($content_width)) $content_width = 640;
    define(‘CPOTHEME_ID’, ‘illustriouspro’);
    define(‘CPOTHEME_NAME’, ‘Illustrious Pro’);
    define(‘CPOTHEME_VERSION’, ‘1.3.0’);
    //Other constants
    define(‘CPOTHEME_LOGO_WIDTH’, ‘195’);
    define(‘CPOTHEME_USE_SLIDES’, true);
    define(‘CPOTHEME_USE_FEATURES’, true);
    define(‘CPOTHEME_USE_PORTFOLIO’, true);
    define(‘CPOTHEME_THUMBNAIL_WIDTH’, ‘600’);
    define(‘CPOTHEME_THUMBNAIL_HEIGHT’, ‘400’);

    //Load Core; check existing core or load development core
    $core_path = get_template_directory().’/core/’;
    if(defined(‘CPOTHEME_CORE’)) $core_path = CPOTHEME_CORE;
    require_once $core_path.’init.php’;

    $include_path = get_template_directory().’/includes/’;

    //Main components
    require_once($include_path.’setup.php’);

    add_filter( ‘tribe_events_community_required_fields’, ‘my_community_required_fields’, 10, 1 );

    function my_community_required_fields( $fields ) {
    $fields = array(
    ‘post_title’,
    );
    }

    Warning: array_merge(): Argument #1 is not an array in /home/jsowebmaster/jazzoregon.com/wp-content/plugins/the-events-calendar-community-events/src/Tribe/Captcha/Abstract_Captcha.php on line 121
    My Events
    Not Gene Forte? Log Out

    Warning: array_merge(): Argument #1 is not an array in /home/jsowebmaster/jazzoregon.com/wp-content/plugins/the-events-calendar-community-events/src/Tribe/Captcha/Abstract_Captcha.php on line 121

    Warning: in_array() expects parameter 2 to be array, null given in /home/jsowebmaster/jazzoregon.com/wp-content/plugins/the-events-calendar-community-events/src/functions/template-tags.php on line 482
    Event Title:

    Warning: array_merge(): Argument #1 is not an array in /home/jsowebmaster/jazzoregon.com/wp-content/plugins/the-events-calendar-community-events/src/Tribe/Captcha/Abstract_Captcha.php on line 121

    Warning: in_array() expects parameter 2 to be array, null given in /home/jsowebmaster/jazzoregon.com/wp-content/plugins/the-events-calendar-community-events/src/functions/template-tags.php on line 482
    Event Description:

    #1128928
    Ben
    Participant

    Must have copied the code incorrectly. The mod is working now. However, it would be nice to have a setting that allows selection of required fields rather than having to maintain a patch. Thanks –Gene

    #1129359
    George
    Participant

    Thank you for posting your solution and updating this thread, Gene.

    Just to be honest so that you can set your expectations, there are no current plans for adding a “required fields” option to Community Events—this may come some time in the future, but I just wanted to let you know that a snippet will be required for the foreseeable future. 🙁

    Sorry to disappoint on that front! Please do voice your opinion on this on our UserVoice page here ? http://tribe.uservoice.com

    Other customers can vote on submitted ideas on that page, which we pay close attention to—submit this idea (and any other ideas you might have about our products), and it might help expedite the realizing of those ideas in our plugins.

    Open a new thread here any time if other issues or questions arise.

    Cheers,
    George

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Easy way to make description not required.’ is closed to new replies.