Force new venue in community events?
Thanks for getting in touch with us! Let me try to help you with this topic.
First, please let me note that we are fairly limited in how much support we can give for custom development questions like that. But, we always like helping out and at least point users into the right direction as much possible.
Just to confirm I understand what you are trying to achieve, do you only need to allow the users to create a new venue and not select one already created?
Please let me know about it.
Thanks, I understand you offer limited custom support.
In this case, I hired a developer to work with me on this and she’s following this thread.
Is there anything that you can share here that would enable her to make the changes we need to force adding new events as opposed to choosing from the list?
Sure! The venue metabox is contained in the venue.php template file located at /wp-content/plugins/the-events-calendar-community-events/src/views/community/modules/. The venue selector and fields are called around line 60 of the file.
Additionally, you might want to check the venue-fields.php template in that same folder that contains the new venue fields that show up to create a new venue.
I hope that helps. Let me know if any follow up questions.
Sure! Let me help you with each of the points:
- Unfortunately, I can confirm this is a bug on our end and I could find a report for this issue. I will set this thread’s status to “Pending fix” and link it to the report. This way, we will notify you once a fix is released in one of our next maintenance releases of our plugins.
We apologise for this inconvenience and we appreciate your patience while we work on it.
- You can use the ‘tribe_events_tribe_venue_new_form_fields‘ filter to modify the template path of the template that holds the venue form fields. If you only want to modify it in the community submission form, you can use the tribe_is_community_edit_event_page() helper function to make check it before modifying the template.
If you are referring to the venue website, then that is default validation from the browser because the input field is of type=url. To prevent this validation you can make a template override of the venue-fields.php file and change line 146 to be
As a reference, let me point you to our Themer’s Guide to know more about template overrides > https://theeventscalendar.com/knowledgebase/themers-guide/
I hope it helps. 🙂
Glad to be of help here 🙂
It’s great to hear your developer could solve that issue on your end. If you think the fix could be applied to our plugins as well, feel free to share it with us and I will make sure to pass it along to the developers so they can take it into account.