• Resolved boomalex

    (@boomalex)


    Trying to be able to use this car look up function to display in a form which can be sent via email. If you go to : https://www.engine-repair.co.uk/ type in a reg number and fill in the form, I would like those details to also show in the email but it is currently just showing the shorcode

    Make: [ukvd_getbasicitem dataitem='make']
    
    Model: [ukvd_getbasicitem dataitem='model']
    
    Year: [ukvd_getbasicitem dataitem='year']
    
    Colour: [ukvd_getbasicitem dataitem='colour']
    
    <label> Your Name (required)
        [text* your-name] </label>
    
    <label> Your Email (required)
        [email* your-email] </label>
    
    <label> Subject
        [text your-subject] </label>
    
    <label> Your Message
        [textarea your-message] </label>
    
    [submit "Send"]

    Function trying in function.php

    function addUkvdMailTags( $output, $name, $html ) {
    if ( ‘ukvd_getbasicitem_make‘ == $name )
    $output = do_shortcode( "[ukvd_getbasicitem dataitem='make']" );
    return $output;
    }
    	    add_filter( 'wpcf7_special_mail_tags', 'addUkvdMailTags' , 10, 3 );

    Any help is much appreciated, thank you.

    • This topic was modified 5 years, 11 months ago by boomalex.

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Plugin Author Tobias Zimpel

    (@tz-media)

    Hi @boomalex,

    First of all, sorry for the late answer to your question.

    You need to add a function like this for all shortcodes that you need in your email template.

    However, you don’t have to use the original shortcode in your email template, but e.g. [ukvd_getbasicitem_make].

    Hope this helps. If not, feel free to reply here and I’ll to help you.

    I’m currently working on a version of the plugin that provides a user interface for adding shortcodes to the system, instead of having to add custom PHP code.

    Best regards,

    Tobias

Viewing 1 replies (of 1 total)
  • The topic ‘Shortcode in mail’ is closed to new replies.