Remove options and add text to Community Events form

Home Forums Calendar Products Community Events Remove options and add text to Community Events form

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #1297641
    Gibson
    Participant

    I want to remove the categories field from the user submission form. How can I do that?

    Secondly, I want to add some text instructions to the form – image size requirements, and legal disclaimer copy – is there an easy way to do that or do I need to get a developer?

    #1298265
    Victor
    Member

    Hi Gibson!

    Thanks for getting in touch with us! Let me help you with that 🙂

    You can accomplish all that by doing a template customization. We have a great article that will get you started on this here > https://theeventscalendar.com/knowledgebase/themers-guide/

    You don’t need to get a developer, unless you want to. I think it really depends on the customization you need to accomplish.

    I hope you can get that done! Let me know if you have any other questions and I’d be happy to help.

    Best,
    Victor

    #1299274
    Gibson
    Participant

    This is not really helpful for me since we don’t have anyone on staff to do PHP or CSS. I noticed an earlier post where one your team members gave a customer some custom CSS to remove one of the form fields in the Community Events user form. In this case, I need to remove the “Categories” field because we don’t want users to access it. Can someone do the same for me? Thanks

    #1299485
    Victor
    Member

    Hi Gibson!

    Sure! I would suggest overriding the edit-event.php template to make that happen. It basically boils down to this:

    • Make a copy of the edit-event.php template. It is located at wp-content/plugins/the-events-calendar-community-events/src/views/community/edit-event.php
    • Make a new folder in your theme called tribe-events
    • Make a new folder in that one called community
    • Drop your copied edit-event.php file in that last folder

    Now that the template is in your theme, you can modify it to suit your needs. In this case, comment out or completely eliminate line 41.

    Will this work for you? Please let me know. 🙂

    Best,
    Victor

    #1302486
    Gibson
    Participant

    Victor,

    OK – I did that and that worked. Thanks. Also in my initial ticket above I was hoping to add additional text in a few places:

    Just above the image form field, there is some text that says: “Choose a .jpg, .png, or .gif file under 128 MB in size.” I need to add a few more directions there. And, I’d like to add some text at the top or bottom of form that is a legal disclosure – just a few lines. How would I add those?

    #1306450
    Victor
    Member

    Hi Gibson!

    Sure! You can add those text lines in a similar way. You can edit the Event Image section by making a template override of the image.php template file located at wp-content/plugins/the-events-calendar-community-events/src/views/community/modules/.

    In line 43 you’ll find the snippet that prints the image requirements, so you could add your custom text right after that.

    Let me know how it goes.

    Best,
    Victor

    #1308122
    Gibson
    Participant

    And that worked too – thanks! So, we’re almost there. I also mentioned adding some legal text at the top or bottom of form. Is there a PHP file I can follow the same procedure for to add that? Thanks for all of your help!

    • This reply was modified 8 years, 10 months ago by Gibson.
    #1308527
    Victor
    Member

    Hey Gibson!

    I’m glad you could make that work!

    As for the legal text, it’s also similar, but you have two options here:

    One would be to add the legal text right at the end of the template override for edit-event.php.

    The other way, would be to make use of the ‘tribe_events_community_form_after_template’ or the ‘tribe_events_community_form_before_template’ action hooks that are present in the edit-event.php. To do that, you can add the following lines to your theme’s function.php file:

    add_action( 'tribe_events_community_form_after_template', 'add_legal_text');
    function add_legal_text() {
    echo '

    Your legal text here.

    ';
    }

    I hope that helps! Let me know if you have other questions.

    Cheers!
    Victor

    #1312785
    Gibson
    Participant

    Thanks Victor,

    I’m not sure how to do either of those things and could use a little expert advice. If I go with the first option, how/where would I add that. Is there some accompanying PHP that I need to add that or do I just add the text somewhere? I’m a complete novice with CSS and PHP.

    #1314825
    Victor
    Member

    Hello Gibson!

    Sure! I’d be happy to help!

    First off, I do want to note that we are fairly limited in how much we can support custom development questions like this.

    That said, I’d be happy to at least point you in the right direction as best I can.

    If going for the first option, you can edit the edit-event.php file you created before and add the following HTML text at the bottom it:

    Your legal text here

    If you were to put another text before the form, then you should add that text in line 28.

    Let me know how that works for you 🙂

    Cheers!
    Victor

    #1324895
    Support Droid
    Keymaster

    Hey 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

Viewing 11 posts - 1 through 11 (of 11 total)
  • The topic ‘Remove options and add text to Community Events form’ is closed to new replies.