Home › Forums › Calendar Products › Community Events › Issues with Add Event Form: Validation, Field Labels
- This topic has 14 replies, 3 voices, and was last updated 6 years, 5 months ago by Kamala.
-
AuthorPosts
-
July 11, 2017 at 3:01 pm #1319777KamalaParticipant
Having an issue trying to get the Community Events add-on to work as required. Also, have one question regarding field labels.
- Required Email Field Validation: I have made the organizer’s email field required on the Add Event form as per this article: https://theeventscalendar.com/knowledgebase/required-fields-for-events-submission-form/.
Code in our functions.php is:
add_filter( 'tribe_events_community_required_fields', 'mark_twain_country_event_required_fields', 10, 1 ); function mark_twain_country_event_required_fields( $fields ) { if ( ! is_array( $fields ) ) { return $fields; } $fields[] = 'Organizer'; $fields[] = 'Email'; return $fields; }
I enter a valid email address in the Organizer’s email field and expect the form submission to be validated. However, get the error message “Email is required” and the form is not submitted.
- Is there a way to change the field label under Venue from “Postal Code” to “Zip Code”?
Thank you in advance for your help.
July 12, 2017 at 7:33 pm #1320339ShelbyParticipantHey there,
Thanks for posting, & Iโm happy to help. ๐
I’m going to be doing some work on my testing server, but I wanted to give you a heads up that this kind of request *might* require some customization that we can’t provide on these forums. We’ll have to see.
However, we do have some resources for guidance making theme customizationsย here. ย I’d suggest checking that guide out while I work on things on my end. If you end up needing to find someone to help with the customizations, we also have some tips for finding help here.
Hope this helps, and thanks for your patience!
Best,
Shelby ๐
July 15, 2017 at 8:47 am #1321685ShelbyParticipantHi there,
Could you try this instead and see if it resolves the issues you’re having?
add_filter( 'tribe_events_community_required_fields', 10, 1 ); function my_community_required_fields( $fields ) { if ( ! is_array( $fields ) ) { return $fields; } $fields[] = 'Organizer'; $fields[] = 'Email'; return $fields; }
Best,
Shelby ๐
July 17, 2017 at 5:46 pm #1322390KamalaParticipantHi Shelby,
I just got a chance to try that code snippet you sent. Unfortunately, it
doesn’t work:– I fill in the email field, click submit, and “Email required” error
message is still displayed.By the way, I had already tried that code you sent as well as different
variations…Regards,
Cindy
—
——————————————–
Cindy Lutz
Membee / IRM Systems Inc.
800.729.2962 (toll free) ext. 429
403.250.8366 (fax)
Site: http://www.membee.com
———————————————Membee – The Hardworking Membership Management System from IRM Systems.
Celebrating 20 years of serving non-profits.Heard the latest buzz about Membee? Visit our blog and sign up for email
notifications at http://blog.membee.com.July 19, 2017 at 7:54 am #1323257ShelbyParticipantHey again Cindy,
I reached out to some of our team, and as it turns out, we had some updates made to the knowledgebase article you referenced in your initial post. So, try the following code instead. ๐ If it doesn’t work, I’ll follow up with the person who updated it this week :
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[] = 'email'; return $fields; }
Let me know how that goes!
Best,
Shelby ๐
July 31, 2017 at 4:13 pm #1328525KamalaParticipantHi Shelby,
Unfortunately the latest snippet you sent for me to try does not work either.
July 31, 2017 at 6:12 pm #1328555ShelbyParticipantHi Again,
Unfortunately Cindy, I believe the code isn’t working because of a theme or plugin conflict. Could you test that theory by working through the steps in this documentation?
Let me know how that goes!
Best,
Shelby ๐
August 3, 2017 at 9:12 am #1330091KamalaParticipantHi Shelby,
There is no conflict. I switched to the Twenty Seventeen theme and disabled all plugins except for the two Events Calendar plugins. Still, the required organizer name and email fields are not validating as expected.
I tested these three combinations of code snippets in functions.php:
-
This does absolutely nothing, even though your documentation says it should require all Organizer fields be required. The form submitted as valid with only Event Title and Event Description filled in.
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[] = ‘organizer’;
return $fields;
} - This latest code snippet you sent me does not work either. The form submitted as valid with only Event Title and Event Description filled in. 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[] = ’email’;
return $fields;
} - Also tested by pasting both of the snippets into functions.php. That time the form would not validate even though all required fields were filled in.
This is getting extremely frustrating. I’ve spent hours on trying to get this minor thing to work. Have you been able to replicate it?
Cindy
August 8, 2017 at 7:56 pm #1332560ShelbyParticipantHi Cindy,
Thanks for your patience. I was out at the end of last week, so thanks for hanging in there! I’m going to take a look at this tomorrow and try to replicate yet again. This one is really bugging me, and I can imagine how frustrating it is for you!
Look for a follow up on this tomorrow.
Thanks,
Shelby
August 10, 2017 at 10:48 am #1333600ShelbyParticipantHi again Cindy,
I’m still not seeing these issues, BUT I have consulted with Brian to see if he can help me out with updating the snippet he wrote that was part of a previous thread and of the knowledgebase article, so hang tight and I’ll let you know when I get that back from him. ๐
Best,
Shelby ๐
August 12, 2017 at 10:20 pm #1334578ShelbyParticipantHi Cindy,
I heard back from Brian, and as it turns out, he’s taking some time off, so I’m seeking out help from other teammates. Thanks for hanging in there! I will let you know when I get assistance with this snippet.
Cheers,
Shelby ๐
September 14, 2017 at 10:14 am #1349374KamalaParticipantHi Shelby – Any news on this ticket?
October 12, 2017 at 4:10 pm #1362969VictorKeymasterHello Cindy!
First, I wanted to apologise for taking so long getting back to you. Shelby no longer works with us and this thread has gone out of our radar until today somehow.
I went over this thread to catch up with your issue, so let me try to help you with this.
I have been able to make the organizer Email required by placing the following snippet into the active theme’s functions.php file:
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[] = 'organizer'; 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[] = 'Email'; return $fields; }
This will require the organizer to be assigned to the event and also require the Organizer Name and Email.
Please try it out and let us know if it works for you.
Thanks,
VictorNovember 3, 2017 at 9:35 am #1374754Support DroidKeymasterHey 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 - Required Email Field Validation: I have made the organizer’s email field required on the Add Event form as per this article: https://theeventscalendar.com/knowledgebase/required-fields-for-events-submission-form/.
-
AuthorPosts
- The topic ‘Issues with Add Event Form: Validation, Field Labels’ is closed to new replies.