Community Events – How to set Category Defaults

Home Forums Calendar Products Community Events Community Events – How to set Category Defaults

Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • #995850
    Dean Spencer
    Participant

    Hi, is it possible to set a default ‘Event Category’ for users who are adding their own events via the Community plug-in / add-on?

    We have hundreds of categories, and we don’t want users to have to scroll down them all to try and chose the right ones. If possible we would like to hide the choices.

    There doesn’t seem to be an option in the control panel.

    Please help.

    #995946
    Josh
    Participant

    Hey Adele,

    Thanks for reaching out to us!

    You can customize the form for the Community Events template by following our Themer’s Guide. For this particular section, you’ll want to copy the Community Events > views > modules > taxonomy.php. The function that is being called there is the formCategoryDropdown from the “Main.php” file from within the Community Events plugin.

    You can take this function as a starting template for creating the customizations you would like to get that section displaying how you want.

    Let me know if this helps.

    Thanks!

    #996871
    Dean Spencer
    Participant

    Great, we can now see how to remove fields etc and make it look the way we want.

    The issue we now have though is that anonymous submissions cannot be added as the website says:

    An internal error occurred: 51D94C8AB7B40.A140C94.2D05BACD

    This is under SPAM-Check?

    Can you please let us know how to resolve?

    #996907
    Josh
    Participant

    Hey,

    Thanks for following up with us!

    I took a look at your site and noticed the warning prior to submission. Did you happen to include the custom code for the recaptcha prior to the built-in solution within the Community Events plugin? This error may be due to the old code requiring the Contact Form 7 recaptcha plugin to work.

    Let me know if this helps.

    Thanks!

    #996984
    Dean Spencer
    Participant

    Hi, the only change I have made is to remove the fields I don’t want from the file edit-event.php

    It works when logged on to the site, just not when submitting events as an anonymous user.

    Thank you

    #997364
    Josh
    Participant

    Hey,

    Thanks for the clarification. Would you mind submitting a gist.github.com of your customized edit-event.php file?

    Thanks!

    #997520
    Dean Spencer
    Participant

    Hi, I have copied and pasted the code into the thread:

    <?php
    /**
    * Event Submission Form
    * The wrapper template for the event submission form.
    *
    * Override this template in your own theme by creating a file at
    * [your-theme]/tribe-events/community/edit-event.php
    *
    * @package Tribe__Events__Community__Main
    * @since 3.1
    * @author Modern Tribe Inc.
    *
    * @var object $event
    * @var array $required
    *
    */

    if ( ! defined( ‘ABSPATH’ ) ) {
    die( ‘-1’ );
    }

    $events_label_singular = tribe_get_event_label_singular();

    ?>

    <?php tribe_get_template_part( ‘community/modules/header-links’ ); ?>

    <?php do_action( ‘tribe_events_community_form_before_template’ ); ?>

    <form method=”post” enctype=”multipart/form-data” data-datepicker_format=”<?php echo esc_attr( tribe_get_option( ‘datepickerFormat’, 0 ) ); ?>”>

    <?php wp_nonce_field( ‘ecp_event_submission’ ); ?>

    <!– Event Title –>
    <?php do_action( ‘tribe_events_community_before_the_event_title’ ) ?>

    <div class=”events-community-post-title”>
    <?php tribe_community_events_field_label( ‘post_title’, sprintf( __( ‘%s Title:’, ‘tribe-events-community’ ), $events_label_singular ) ); ?>
    <?php tribe_community_events_form_title(); ?>
    </div><!– .events-community-post-title –>

    <?php do_action( ‘tribe_events_community_after_the_event_title’ ) ?>

    <!– Event Description –>
    <?php do_action( ‘tribe_events_community_before_the_content’ ); ?>

    <div class=”events-community-post-content”>
    <?php tribe_community_events_field_label( ‘post_content’, sprintf( __( ‘%s Description:’, ‘tribe-events-community’ ), $events_label_singular ) ); ?>
    <?php tribe_community_events_form_content(); ?>
    </div><!– .tribe-events-community-post-content –>

    <?php do_action( ‘tribe_events_community_after_the_content’ ); ?>

    <?php tribe_get_template_part( ‘community/modules/image’ ); ?>

    <?php tribe_get_template_part( ‘community/modules/datepickers’ ); ?>

    <?php tribe_get_template_part( ‘community/modules/venue’ ); ?>

    <?php tribe_get_template_part( ‘community/modules/website’ ); ?>

    <?php tribe_get_template_part( ‘community/modules/custom’ ); ?>

    <?php tribe_get_template_part( ‘community/modules/cost’ ); ?>

    <!– Spam Control –>
    <?php Tribe__Events__Community__Main::instance()->formSpamControl(); ?>

    <!– Form Submit –>
    <?php do_action( ‘tribe_events_community_before_form_submit’ ); ?>
    <div class=”tribe-events-community-footer”>
    <input type=”submit” id=”post” class=”button submit events-community-submit” value=”<?php

    if ( isset( $post_id ) && $post_id ) {
    echo apply_filters( ‘tribe_ce_event_update_button_text’, sprintf( __( ‘Update %s’, ‘tribe-events-community’ ), $events_label_singular ) );
    } else {
    echo apply_filters( ‘tribe_ce_event_submit_button_text’, sprintf( __( ‘Submit %s’, ‘tribe-events-community’ ), $events_label_singular ) );
    }

    ?>” name=”community-event” />
    </div><!– .tribe-events-community-footer –>
    <?php do_action( ‘tribe_events_community_after_form_submit’ ); ?>

    </form>
    <?php
    do_action( ‘tribe_events_community_form_after_template’ );

    #997533
    Josh
    Participant

    Hey,

    Does the recaptcha issue persist even if you switch back to the using the default edit-event.php file? It doesn’t look like the change you’ve made would be causing the issue you’re now seeing.

    If that’s the case, try following the Testing for Conflicts procedures to see if there is a conflict occurring somewhere else on the site.

    Let me know if this helps.

    Thanks!

    #997611
    Dean Spencer
    Participant

    I have put the original file back and the error still occurs.

    I will leave the file in place while I check through the link you have sent me.

    #997632
    Dean Spencer
    Participant

    I have tried disabling the add-ins and the problem still occurs?

    Interestingly the problem goes away when logged in, i.e. as admin?

    #998041
    Josh
    Participant

    Hey,

    Thanks for following up. Have you tried switching to a default WordPress theme? It sounds like there may be some type of conditional code which is being added based on a login condition that could be added by your theme.

    Let me know if the issue persists with a default theme.

    Thanks!

    #999810
    Dean Spencer
    Participant

    Hi apologies for the delay, I just wanted to make sure the site was fully backed-up before changing things around.

    I have reset the default theme to 2013 and disabled all the plug-in with exception to the ones the site needs to run.

    The issue still occurs.

    Do you think this is a permissions issue?

    #1000512
    Josh
    Participant

    Hey,

    No problem. Try checking your reCAPTCHA settings at the bottom of the Events Settings > Community tab (https://cloudup.com/cAMbtGGEQNS).

    Ensure that the domain is set properly in the reCAPTCHA settings when generating your site key and private key.

    Let me know if this helps.

    Thanks!

    #1002885
    Dean Spencer
    Participant

    That’s it, it was the reCAPTCHA codes. I regenerated them and it began to work!

    Thank you for your help!

    #1003140
    Josh
    Participant

    Hey,

    No problem! Glad this was able to get cleared up for ya!

    I’ll go ahead and close this thread for now. If you have any further questions, please don’t hesitate to open a new thread.

    Thanks!

Viewing 15 posts - 1 through 15 (of 15 total)
  • The topic ‘Community Events – How to set Category Defaults’ is closed to new replies.