Adding Custom Field to Email Template

Home Forums Calendar Products Community Events Adding Custom Field to Email Template

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #953129
    mvtimes
    Participant

    Hi,

    We have added a custom field for Event Contact and would like this field to be pulled from the databased and ‘printed’ in an email.

    Here is the field id/name:
    <input type=”text” id=”tribe_custom_event-contact” name=”_ecp_custom_2″ value=””>

    I was able to pull the name into a ‘required field’ list in the theme’s functions.php.

    However I am not sure I can modify the php _e() or php echo in the email-template.
    If I can, can you tell me what ID or Name to use in the php echo below??

    Thanks
    Patrick

    php _e( ‘Event Organizer’, ‘tribe-events-community’ );
    php echo tribe_get_organizer( tribe_get_event_meta( $post->ID, ‘_EventOrganizerID’, true ) );

    #953263
    George
    Participant

    Hey Barbara,

    Thanks for reaching out to us here.

    I’m a bit uncertain about what exact changes you’re trying to make here, but I’ll throw out some ideas based on what you’ve written and hopefully we can go from there – for example, if what you’re trying to do is simple <b>replace</b> the code you posted with some code that displays the value of that meta field, then the following code should do:

    
    echo sanitize_text_field( get_post_meta( $post->ID, '_ecp_custom_2', true ) );
    

    If you’re trying to do something more complex with the email templates, let me know about it in more detail. We can only provide very limited support for customizations and custom code, but we might be able to at least offer some specific advice that will help you get started before taking the reins yourself.

    One last thing worth sharing is our official Themer’s Guide – it has a lot of information about customizing templates like you’re aiming to do here → https://theeventscalendar.com/knowledgebase/themers-guide/

    Cheers!
    George

    #983963
    Support Droid
    Keymaster

    This topic has not been active for quite some time and will now be closed.

    If you still need assistance please simply open a new topic (linking to this one if necessary)
    and one of the team will be only too happy to help.

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Adding Custom Field to Email Template’ is closed to new replies.