Required fields for 'Additional Fields' in Community Events

Home Forums Ticket Products Community Tickets Required fields for 'Additional Fields' in Community Events

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #1578670
    Dylan Cooper
    Participant

    Hi, I’m trying to make all fields Required fields for ‘Additional Fields’ in the Community Events form that I’ve set up using _ecp_custom

    Is there a way to make them all required, instead of only Description and Title?

    Any help is appreciated. Thanks.
    Dylan

    #1579120
    Sky
    Keymaster

    Hi Dylan,

    Thanks for reaching out! I’d be happy to help with your question.

    You can add the following code snippet to your functions.php or a functionality plugin.

    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[] = '_ecp_custom_2'; // this is the field name for the input you want to require
    $fields[] = '_ecp_custom_3'; // this is another input you wish to require

    return $fields;
    }

    For each custom field you wish to be required, add the field name to the fields array before it is returned. To find the field name, inspect the input in your browser and copy whatever is set for the input “name” attribute.

    Hope that helps! Please let me know if you have any further questions about this.

    Thanks,
    Sky

    #1594823
    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 ‘Required fields for 'Additional Fields' in Community Events’ is closed to new replies.