Home › Forums › Calendar Products › Community Events › Remove options and add text to Community Events form
- This topic has 11 replies, 2 voices, and was last updated 8 years, 9 months ago by
Gibson.
-
AuthorPosts
-
June 13, 2017 at 10:51 pm #1297641
Gibson
ParticipantI 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?
June 14, 2017 at 9:30 pm #1298265Victor
MemberHi 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,
VictorJune 16, 2017 at 10:43 am #1299274Gibson
ParticipantThis 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
June 16, 2017 at 10:11 pm #1299485Victor
MemberHi 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,
VictorJune 23, 2017 at 12:59 pm #1302486Gibson
ParticipantVictor,
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?
June 26, 2017 at 8:37 am #1306450Victor
MemberHi 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,
VictorJune 26, 2017 at 7:09 pm #1308122Gibson
ParticipantAnd 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.
June 27, 2017 at 7:39 am #1308527Victor
MemberHey 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!
VictorJune 29, 2017 at 2:45 pm #1312785Gibson
ParticipantThanks 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.
June 30, 2017 at 6:42 pm #1314825Victor
MemberHello 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!
VictorJuly 22, 2017 at 9:35 am #1324895Support Droid
KeymasterHey 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 -
AuthorPosts
- The topic ‘Remove options and add text to Community Events form’ is closed to new replies.
