Home › Forums › Calendar Products › Community Events › Required Fields Customization
- This topic has 2 replies, 3 voices, and was last updated 10 years, 1 month ago by
Support Droid.
-
AuthorPosts
-
March 14, 2016 at 9:54 am #1088522
Brian
ParticipantI want to simplify required fields for non-logged in users to submit an event.
I’ve added the code (below) to my functions.php file – as suggested on the Customize the List of Required Fields page – https://theeventscalendar.com/knowledgebase/required-fields-for-events-submission-form/
add_filter( ‘tribe_events_community_required_fields’, ‘my_community_required_fields’, 10, 1 );
function my_community_required_fields( $fields ) {
$fields = array(
‘post_title’,
‘post_content’,
);// Requiring the organizer email (or other “square bracketed”
// fields) can’t be done using the above approach, but we can
// simply test within the $_POST superglobal directly.
//
// If a field hasn’t been populated then we simply add a requirement
// using a field name we know doesn’t exist, but can be used to form
// a meaningful error message (if the org email is missing the user
// will see “Organizer Email is required”).
//
// You could take this a step further and additionally validate the
// email field to ensure it looks like a valid email address and
// provide an alternative error using the same approach.
if ( empty( $_POST[‘organizer’][‘Email’] ) )
$fields[] = ‘Organizer Email’;return $fields;
}The URL in question is: https://crownbasketball.com/events/community/add
March 14, 2016 at 9:08 pm #1088910Geoff B.
MemberGood evening Brian and welcome to the Events Calendar Support forum!
Thank you for reaching out to us.
I would love to try to help you with this topic.Just to set expectations, as you might know, the scope of our support is mostly to get our wonderful customers started on the right track to customize their site and to help them in case of issues. We unfortunately do not provide complete support for customization.
With that in mind, I am unsure what your question is ? Are you looking for help to code this yourself ? Are you looking for somebody to do that customization for you ?
If it is the latter, then you could hire one of our recommended customizers to do the customization as we do not take on such customizations ourselves.
Please let me know.
Best regards,
Geoff B.
March 29, 2016 at 9:35 am #1095479Support Droid
KeymasterThis topic has not been active for quite some time and will now be closed.
If you still need assistance please simply open a new topic (linking to this one if necessary)
and one of the team will be only too happy to help. -
AuthorPosts
- The topic ‘Required Fields Customization’ is closed to new replies.
