Home › Forums › Calendar Products › Events Calendar PRO › Adding a Custom Field to Venue section of Event admin form
- This topic has 5 replies, 4 voices, and was last updated 9 years, 5 months ago by
Ben.
-
AuthorPosts
-
October 12, 2016 at 4:04 pm #1175665
Ben
ParticipantIs there an action or filter that would allow you to add a venue custom field (Advanced Customer Fields 4.4.10 or standard custom field) to the venue section of the event input/edit form used by the admin console?
October 12, 2016 at 8:55 pm #1175740Nico
MemberHey Gene,
Thanks for getting in touch with us! Glad to help you once again 🙂
I’ve inspected the code quickly and there’s no super easy way of adding this, but it seems possible to create a template override of the view that renders those fields. Once the fields are in place it should be possible to save them or delete them.
Can you elaborate a bit more and what fields are you looking to include? Also I’m not much familiarized with ACF so let’s stick with just saving the values in regular fields for now.
Please let me know about it and I’ll try to put together a sample code for you to build on top,
Best,
NicoOctober 13, 2016 at 9:53 am #1176066Ben
ParticipantI want to add a field to capture the email address of each venue. This is very handy since we send monthly reminders to venues to send us their event updates. I am able to add a custom field to the venue form and show it in admin list view using Admin Columns plugin. But I want to make it possible for events coordinator to enter the email when a new venue is created in the new event form.
October 17, 2016 at 4:29 pm #1178011Nico
MemberThanks for following up Gene!
With this snippet -paste it in your theme’s (or child theme’s) functions.php file- you should be able ton insert html at the end of the venue form:
/* Tribe, insert fields in the new venue form in the add events screen */
function tribe_hijack_venue_fields_template ( $event_id ) {echo '<table><tr class="linked-post venue">';
echo '<td class="tribe-table-field-label">Label:</td>';
echo '<td>_input_</td>';
echo '</tr></table>';
}add_action( 'tribe_after_location_details', 'tribe_hijack_venue_fields_template' );
Please let me know if you can make it work from there or still need help,
Best,
NicoNovember 8, 2016 at 8:35 am #1189199Support 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 ‘Adding a Custom Field to Venue section of Event admin form’ is closed to new replies.
