Adding a Custom Field to Venue section of Event admin form

Home Forums Calendar Products Events Calendar PRO Adding a Custom Field to Venue section of Event admin form

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1175665
    Ben
    Participant

    Is 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?

    #1175740
    Nico
    Member

    Hey 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,
    Nico

    #1176066
    Ben
    Participant

    I 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.

    #1178011
    Nico
    Member

    Thanks 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,
    Nico

    #1189199
    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 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Adding a Custom Field to Venue section of Event admin form’ is closed to new replies.