Removal of fields from "Add Event" page – on the front end and the back end…

Home Forums Calendar Products Community Events Removal of fields from "Add Event" page – on the front end and the back end…

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #1013015
    Marc de Villiers
    Guest

    Hi guys!

    Please see topic: https://theeventscalendar.com/support/forums/topic/using-events-calendar-pro-and-community-events/#post-1007191

    We’ve bought the Pro version and the Community Plugin for this site..

    – How can we remove certain fields from the Add Event Page? We want our users to see just certain fields when adding an event, so that it doesn’t look like a generic system..

    The fields we want to remove are:

    Organizers (the whole section)

    Tickets/Cost (the whole section)

    Event Description

    Event Website

    Looking forward to your feedback!

    #1013017
    Marc de Villiers
    Guest

    Sorry, I also need to change the title of “Event Categories” on the input form as well as the event view page, to “Target Audience”

    #1013255
    Geoff
    Member

    Hi Marc! Welcome to the forums and thanks a TON for upgrading to PRO and Community. We’re stoked to have you aboard. 🙂

    – How can we remove certain fields from the Add Event Page?

    It will take a little bit of customization to get this going, but I’m happy to help point you in the right direction if I can.

    That said, I think adding CSS to your theme’s style.css file is a good approach for hiding form fields. For example, this could hide those fields you mention:

    #tribe-community-events #event_organizer,
    #tribe-community-events #event_cost,
    #tribe-community-events #event_website,
    .events-community-post-content {
    display: none;
    }

    Do note that the Event Description is a required field, so you will want to change that to a non-required field if you can, or else the event will never submit when entered. Here’s an article to get you started on that as well.

    Will this help you get started? Please let me know.

    Cheers!
    Geoff

    #1014791
    Marc de Villiers
    Guest

    Thanks Geoff!

    Checking this out now.. much appreciated!

    #1014799
    Marc de Villiers
    Guest

    Sorry Geoff!

    Just need a last few pointers..

    We want to keep the “Event Description” after all, but hide:

    Event Image (Hide on capture form and front end)

    Under “Company Details” we want to hide:
    Company Name:
    Address:
    Phone:
    Website:
    Show Google Maps Link:

    Speaker Details (Hide on capture form and front end)

    Event Website (Hide on capture form and front end)

    Event Cost (Hide on capture form and front end)

    What would the CSS be to hide these but keep “Event Description” where it is..?

    I ALSO need to add description text to the labels for:

    Event Title: (required)
    Event Description: (required)​

    .. to rather say

    Event Title​ (eg. Diabetes Talk, Oncology Talk, etc.)​: (required)
    Event Description​ (eg. Umhlanga, Cape Town South, etc.): (required)​

    Looking forward to your feedback!

    #1014802
    Marc de Villiers
    Guest

    One last thing..

    I need to change the title “Event Categories” to rather say “Target Audience”

    – I’ve tried to do the change in the functions.php file:

    add_filter(‘category_label_singular’, ‘change_single_category_label’ );
    function change_single_category_label() {
    return ‘Target_Audience’;
    }

    add_filter(‘category_label_plural’, ‘change_plural_category_label’ );
    function change_plural_category_label() {
    return ‘Target_Audiences’;
    }

    ?>

    .. but to no avail.. Is this a system filter? What would the correct commands be?

    At the moment, the full functions.php text is:

    <?php
    //
    // Recommended way to include parent theme styles.
    // (Please see http://codex.wordpress.org/Child_Themes#How_to_Create_a_Child_Theme)
    //
    add_action( ‘wp_enqueue_scripts’, ‘theme_enqueue_styles’ );
    function theme_enqueue_styles() {
    wp_enqueue_style( ‘parent-style’, get_template_directory_uri() . ‘/style.css’ );
    wp_enqueue_style( ‘child-style’,
    get_stylesheet_directory_uri() . ‘/style.css’,
    array(‘parent-style’)
    );
    }
    //
    // Your code goes below
    //

    function remove_private_prefix($title) {
    $title = str_replace(
    ‘Private:’,
    ”,
    $title);
    return $title;
    }
    add_filter(‘the_title’,’remove_private_prefix’);

    add_filter(‘tribe_organizer_label_singular’, ‘change_single_organizer_label’ );
    function change_single_organizer_label() {
    return ‘Speaker’;
    }

    add_filter(‘tribe_organizer_label_plural’, ‘change_plural_organizer_label’ );
    function change_plural_organizer_label() {
    return ‘Speakers’;
    }

    add_filter(‘category_label_singular’, ‘change_single_category_label’ );
    function change_single_category_label() {
    return ‘Target_Audience’;
    }

    add_filter(‘category_label_plural’, ‘change_plural_category_label’ );
    function change_plural_category_label() {
    return ‘Target_Audiences’;
    }

    ?>

    #1014849
    Geoff
    Member

    Hey Marc,

    Awesome, I’m glad that first bit of CSS helped out!

    We want to keep the “Event Description” after all, but hide…

    You can still use the same CSS tactic to accomplish hiding other elements on the page as well. If you need help finding exactly which elements those are, here’s a great article on how to do that using DevTools in your browser.

    I ALSO need to add description text to the labels for…

    I think the text replacement method used in this Knowledgebase post will help out in this case.

    I need to change the title “Event Categories” to rather say “Target Audience”

    Give that last link I shared a try here as well. 🙂

    Cheers!
    Geoff

    #1015768
    Marc
    Participant

    Hi Geoff!

    Thanks so much for your help thus far..

    I’m still stuck with something though..

    I can’t seem to be able hide, eg. EVENT IMAGE

    … without hiding:

    Event Description: (required) along with it!

    To clarify, we have decided we want to keep:

    Event Description: (required)

    …in place as it is useful to our users to view details of the event in the calendar view screen, but just rename the label to:

    Event Location: (eg. Umhlanga, Cape Town South, etc.) (required) ​

    What CSS would accomplish this for us, or is there another way to do this?

    #1016163
    Geoff
    Member

    Hello Marc,

    This should hide the event image section of the form:

    #tribe-community-events #event_image_uploader {
    display: none;
    }

    Cheers!
    Geoff

    #1017189
    Marc
    Participant

    Hi Geoff!

    It works! Thank you so much!

    I’m still battling to change:

    Event Description: (required)

    to say:

    Event Description (Eg: Pietermaritzburg, Durban, Eastern Cape): (required)

    Sorry! I know I’m being dense here, but my programming skills are somewhat lacking in this area..

    #1017237
    Geoff
    Member

    Hey there, Marc!

    Awesome, I’m so glad that worked. 🙂

    Shoot, I’m actually not aware of how to change the field labels without touching core code, which I really wouldn’t recommend. Sorry about that!

    I’m going to go ahead and close this thread since we’ve gotten pretty past the subject of the original question. If you still have any questions, though, please do open up a new thread and we’d be happy to help you there as best we can.

    Cheers!
    Geoff

Viewing 11 posts - 1 through 11 (of 11 total)
  • The topic ‘Removal of fields from "Add Event" page – on the front end and the back end…’ is closed to new replies.