Follow up question re: add/remove required fields

Home Forums Calendar Products Community Events Follow up question re: add/remove required fields

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #90507
    irishrunner16
    Participant

    Hey Casey,
    One last question regarding my previous topic at https://theeventscalendar.com/support/forums/topic/how-to-make-certain-fields-required-on-submit-an-event-form/

    Would it be possible for you to list the files I’d need to edit to make this type of customization? I think I’d be able to attempt it myself…I’m just a bit confused as to what files I’d need to work with.
    As always I appreciate the help. Thanks and have a great weekend!
    – Sean

    #91384
    Casey
    Participant

    Sean,
    Take a look at our themer’s guide to give you an idea about how the Events Calendar and Community templating system work.

    As far as adding required fields, you should be able to add something like this to your theme’s functions.php file to customize the fields that are required: https://gist.github.com/ckpicker/8407978

    Then you can customize the error message by pasting this code into your theme’s functions.php file and modifying the HTML that gets displayed: https://gist.github.com/ckpicker/8408079

    That should really be it, but let me know if you have further questions.

    Thanks!

    #92568
    irishrunner16
    Participant

    This is great, thanks so much Casey! I’ve got the filter and html up, but I must have pulled an incorrect value in my “add_required_fields”, because the error message is showing up even when all req. fields have values. If you have a chance, could you confirm if one of the values below is incorrect?

    function add_required_fields() {
    return array(
    ‘post_content’,
    ‘post_title’,
    ‘event_taxonomy’,
    ‘EventStartDate’,
    ‘VenueVenue’,
    ‘VenueAddress’,
    ‘VenueCity’,
    ‘VenueCountry’,
    ‘StateProvinceSelect’,
    ‘VenueZip’,
    ‘OrganizerOrganizer’,
    ‘OrganizerEmail’,
    );

    #93041
    Casey
    Participant

    Sean,
    Try using ‘tribe_events_cat’ instead of ‘event_taxonomy’ and see if that does the trick. If that doesn’t work, I would just go through and add new values one at a time to find where the problem value is, and see if you can narrow it down to one incorrect value so we can troubleshoot further.

    Thanks!

    -Casey-

    #93344
    irishrunner16
    Participant

    Hey Casey,
    I tried using a bunch of different values (tried one at a time – see below for the complete list) but I’m getting the error message every time the form is submitted with values in all required fields. Not sure what I’m doing wrong, as I’ve tried a few different possibilities for some of the fields. But clearly I must be missing the correct one to pull from the modules! I’ve even triple checked to ensure the filters in my functions.php file are exactly as you included on https://theeventscalendar.com/change-required-fields-on-community-event-submission-page/. I’m perplexed!

    ‘post_content’,
    ‘post_title’,
    ‘tribe_events_cat’, ‘event_taxonomy’,
    ‘EventStartDate’,
    ‘VenueVenue’, ‘venue_name’, ‘Venue Name’,
    ‘VenueAddress’,
    ‘VenueCity’,
    ‘VenueCountry’, ‘venue_country’, ‘EventCountry’,
    ‘StateProvinceSelect’,
    ‘VenueZip’,
    ‘OrganizerOrganizer’,
    ‘OrganizerEmail’,

    #93484
    Casey
    Participant

    Sean,
    Ok, I’m still learning about this filter, since it’s relatively new, but I got a bit more information about it. Here are the field options that you can specify (they are case-sensitive):

    
    post_content
    EventStartDate
    EventStartHour
    EventStartMinute
    EventStartMeridian
    EventEndDate
    EventEndMinute
    EventEndHour
    EventEndMeridian
    is_recurring
    EventCurrencySymbol
    tax_input – For Event Categories
    Venue
    Organizer
    EventShowMapLink
    EventURL
    

    Unfortunately with the way we handle Venues & Organizers, you can only specify that a name (or a saved item from the dropdown) was entered.

    Note: if you have custom ECP fields that display on the form (screenshot), then you can even specify them as required. Just view the HTML source and find the correct <input> tag, and look for the ‘name’ attribute (screenshot).

    Give those values a try and let me know if that does the trick.

    Thanks!

    -Casey-

    #93506
    irishrunner16
    Participant

    Hey Casey,
    Success! All of these field options worked perfectly. Thanks so much for taking the time to get this information together for myself and everyone else! Really appreciate you going above and beyond for us!

    #93509
    Casey
    Participant

    Great! Glad that did the trick! Let us know if you have other questions. We’re always happy to help! 😉

    -Casey-

Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘Follow up question re: add/remove required fields’ is closed to new replies.