Home › Forums › Calendar Products › Community Events › required fileds submit form
- This topic has 32 replies, 5 voices, and was last updated 6 years, 3 months ago by dsb cloud services GmbH & Co. KG.
-
AuthorPosts
-
July 5, 2017 at 8:22 pm #1316619VictorKeymaster
This reply is private.
August 1, 2017 at 2:36 pm #1329081VictorKeymasterHello Patrick!
Just wanted to share with you that a new maintenance release (for the Week of 24 July 2017) is out, including a fix for this issue 🙂
Find out more about this release → https://theeventscalendar.com/maintenance-release-week-24-july-2017/
Please update the plugins and let us know if the fix works for your site.
Best,
VictorAugust 2, 2017 at 12:18 am #1329300dsb cloud services GmbH & Co. KGParticipantHi Victor,
thanks for letting me know. 🙂
I just installed the updates.
Sadly there are no changes at all.Greetigns
PatrickAugust 3, 2017 at 8:10 am #1330056VictorKeymasterHello Patrick!
Thanks for following up with this.
I’m really sorry this isn’t working for you.
I know you wanted to require the organizer, is it not working for organizer or other fields too?
Could you please try the following code snippet and see if it works for requiring venue and organizer? I could make it work with this:
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[] = 'venue'; $fields[] = 'organizer'; return $fields; }
Please let me know about it.
Thanks,
VictorAugust 3, 2017 at 11:51 pm #1330572dsb cloud services GmbH & Co. KGParticipantHi Victor,
for testing purpose I’ve added all possible requiered fields
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[] = 'post_content'; $fields[] = 'event_image'; $fields[] = 'EventStartDate'; $fields[] = 'EventStartHour'; $fields[] = 'EventStartMinute'; $fields[] = 'EventStartMeridian'; $fields[] = 'EventEndDate'; $fields[] = 'EventEndMinute'; $fields[] = 'EventEndHour'; $fields[] = 'EventEndMeridian'; $fields[] = 'is_recurring'; $fields[] = 'EventCurrencySymbol'; $fields[] = 'tax_input (for event categories)'; $fields[] = 'venue'; $fields[] = 'organizer'; $fields[] = 'EventShowMapLink'; $fields[] = 'EventURL'; return $fields; } add_filter( 'tribe_events_community_required_venue_fields', 'my_venue_community_required_fields', 10, 1 ); function my_venue_community_required_fields( $fields ) { if ( ! is_array( $fields ) ) { return $fields; } $fields[] = 'Venue'; $fields[] = 'Address'; $fields[] = 'City'; $fields[] = 'Province'; $fields[] = 'State'; $fields[] = 'Zip'; $fields[] = 'Phone'; $fields[] = 'URL'; return $fields; } add_filter( 'tribe_events_community_required_organizer_fields', 'my_organizer_community_required_fields', 10, 1 ); function my_organizer_community_required_fields( $fields ) { if ( ! is_array( $fields ) ) { return $fields; } $fields[] = 'Organizer'; $fields[] = 'Phone'; $fields[] = 'Website'; $fields[] = 'Email'; return $fields; }
None of them is working
Greetings
PatrickAugust 4, 2017 at 12:19 pm #1330914VictorKeymasterHi Patrick!
The code you sent is working for me. Are you placing the code in your active theme’s functions.php file?
Are you using any plugin to do so?
Let me know about it.
Best,
VictorAugust 10, 2017 at 12:27 am #1333298dsb cloud services GmbH & Co. KGParticipantHi Victor,
initial I had the code in my theme/trive-events/community/edit-event.php
But now I moved it into my theme’s function.php.
And now, some of them are working but the both I need don’t
Even more, now I can’t search for categories anymore, I get an “loading faild” error. Even if I undo my changes the problem remains. I already installed the newest updates. It also didn’t helped.I don’t use any plugin for modifying my function.php. I manually copy & paste the code 😉
Greetings
PatrickAugust 10, 2017 at 1:28 am #1333308dsb cloud services GmbH & Co. KGParticipantOk, I was able to get things back to work. The “loading faild” is gone and ones again I get my categories. I had to reinstall the whole core Plugin.
Sadly the remaining problems stay 🙁August 10, 2017 at 8:54 am #1333485VictorKeymasterHello Patrick!
Thanks for following up with this and keep me posted about the updates.
Good to know at least some of the required fields are working now. This means the code is in the right place 🙂
Now, could you please tell me what required fields aren’t working for you and share the actual code you are using?
If you could share with me the community add link it would be great so I can see for myself.
Thanks,
VictorAugust 23, 2017 at 11:16 pm #1339545dsb cloud services GmbH & Co. KGParticipantHi Victor,
sorry for my late reply. I didn’t receive an notification email that someone wrote an answer.
My function.php looks like this:<?php # 2017-07-25, fries: Funktion für Anzeige der Event-Kategorien hinzugefügt # 2017-06-21, fries: Wörter im Kalender-Plugin ändern #$custom_text = array( #'Related %s' => 'Similar %s', #'category' => 'Raum', #'taxonomy' => 'Raum', #'TAXONOMY' => 'Raum', #'Kategorien' => 'Raum', #); # 2015-06-01, schoch: Schlagworte mit the_tags eingefuegt function et_divi_post_meta() { $postinfo = is_single() ? et_get_option( 'divi_postinfo2' ) : et_get_option( 'divi_postinfo1' ); if ( $postinfo ) : echo '<p class="post-meta">'; et_postinfo_meta( $postinfo, et_get_option( 'divi_date_format', 'M j, Y' ), esc_html__( '0 comments', 'Divi' ), esc_html__( '1 comment', 'Divi' ), '% ' . esc_html__( 'comments', 'Divi' ) ); echo ' | '; the_tags(); echo '</p>'; endif; } function remove_google_fonts_from_theme() { //get rid of those google fonts //remove_action('et_head_meta','et_add_google_fonts'); //remove_action( 'wp_head', 'et_set_font_properties' ); remove_action( 'wp_enqueue_scripts', 'et_divi_load_fonts' ); } add_action( 'after_setup_theme', 'remove_google_fonts_from_theme' ); if ( class_exists('Tribe__Events__Main') ){ /* get event category names in text format */ function tribe_get_text_categories ( $event_id = null ) { if ( is_null( $event_id ) ) { $event_id = get_the_ID(); } $event_cats = ''; $term_list = wp_get_post_terms( $event_id, Tribe__Events__Main::TAXONOMY ); foreach( $term_list as $term_single ) { $event_cats .= $term_single->name . ', '; } return rtrim($event_cats, ', '); } } ?> <?php 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[] = 'tax_input'; $fields[] = 'venue'; return $fields; } add_filter( 'tribe_events_community_required_venue_fields', 'my_venue_community_required_fields', 10, 1 ); function my_venue_community_required_fields( $fields ) { if ( ! is_array( $fields ) ) { return $fields; } $fields[] = 'Venue'; return $fields; } ?>
I can’t get it work that the fields Event-Categories and venues are requiered. I uploaded a screenshot for a better understanding, which fields I mean.
Sadly I can’t send you a link to the community-link because the website is only internal accessable.Greetings
PatrickAugust 24, 2017 at 7:22 pm #1340110VictorKeymasterHi Patrick!
Thanks for coming back with the code you are using and for the screenshot.
I could reproduce the issue you are having. Requiring the tax_input does not work as you’d expect.
I have logged a new report for this so it can be addresses in one the next maintenance releases. We’ll let you know as soon as a bugfix is released for it.
I apologise for this issue and we’d appreciate your patience while we work on this.
Best,
VictorNovember 20, 2017 at 1:00 pm #1387491CourtneyMemberWe released an update for this issue. Can you update your plugins (preferrably on a staging site) and see if that resolves the issue.
https://theeventscalendar.com/maintenance-release-week-13-november-2017/
Thanks
Courtney ?November 20, 2017 at 10:20 pm #1387731dsb cloud services GmbH & Co. KGParticipantHi Courtney,
thank’s for the information.
I just updated our website and gave it a try. Sadly it seems, nothing have chanced 🙁
I got still the same problem.Greetings
PatrickNovember 21, 2017 at 8:04 am #1388067VictorKeymasterHi Patrick!
Thanks for following up with this.
We are still in the process of updating the Knowledgebase articles for this, but here’s the code you should use to make the event category a required field:
add_filter( 'tribe_events_community_required_fields', 'my_community_required_fields' ); function my_community_required_fields( $fields ) { if ( is_array( $fields ) ) { $fields[] = 'tax_input.tribe_events_cat'; } return $fields; }
Please try it out and let me know if it works for you.
Thanks,
VictorNovember 27, 2017 at 1:09 am #1392139dsb cloud services GmbH & Co. KGParticipantHi Victor,
great thing!! The Event Categories finally work as intended. 🙂
But sadly I got a problem with the venues.
The venue-field gets labeld as requiered, but this will not be checked.
I hope it’s visible in my screenshot.Greetings Patrick
-
AuthorPosts
- The topic ‘required fileds submit form’ is closed to new replies.