Home › Forums › Calendar Products › Community Events › Community Events – How to set Category Defaults
- This topic has 14 replies, 2 voices, and was last updated 10 years, 7 months ago by
Josh.
-
AuthorPosts
-
August 13, 2015 at 11:37 am #995850
Dean Spencer
ParticipantHi, 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.
August 13, 2015 at 8:10 pm #995946Josh
ParticipantHey 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!
August 18, 2015 at 5:22 am #996871Dean Spencer
ParticipantGreat, 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?
August 18, 2015 at 6:48 am #996907Josh
ParticipantHey,
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!
August 18, 2015 at 7:55 am #996984Dean Spencer
ParticipantHi, 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
August 19, 2015 at 2:07 pm #997364Josh
ParticipantHey,
Thanks for the clarification. Would you mind submitting a gist.github.com of your customized edit-event.php file?
Thanks!
August 20, 2015 at 5:05 am #997520Dean Spencer
ParticipantHi, 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=”<?phpif ( 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’ );August 20, 2015 at 6:16 am #997533Josh
ParticipantHey,
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!
August 20, 2015 at 7:59 am #997611Dean Spencer
ParticipantI 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.
August 20, 2015 at 8:18 am #997632Dean Spencer
ParticipantI have tried disabling the add-ins and the problem still occurs?
Interestingly the problem goes away when logged in, i.e. as admin?
August 21, 2015 at 2:19 pm #998041Josh
ParticipantHey,
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!
August 28, 2015 at 12:15 am #999810Dean Spencer
ParticipantHi 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?
August 31, 2015 at 8:58 am #1000512Josh
ParticipantHey,
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!
September 8, 2015 at 7:23 am #1002885Dean Spencer
ParticipantThat’s it, it was the reCAPTCHA codes. I regenerated them and it began to work!
Thank you for your help!
September 8, 2015 at 9:31 pm #1003140Josh
ParticipantHey,
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!
-
AuthorPosts
- The topic ‘Community Events – How to set Category Defaults’ is closed to new replies.
