• Hello!

    How can I do that would be able to use shortcodes in the template mail message?

    Thank.

Viewing 11 replies - 1 through 11 (of 11 total)
  • Hi, I use a free small plugin for this: Contact Form 7 Shortcode Enabler. Does the job for me.

    Thread Starter avense

    (@avense)

    I tried to use this plug-in “Contact Form 7 Shortcode Enabler”, it does not work.

    From: [your-name] <[your-email]>
    Subject: [your-subject]
    
    Message:
    [your-message]
    
    --
    [my_shortcode]

    Results:

    From: [email protected] <[email protected]>
    Subject: My subject
    
    Message:
    My test message.
    
    --
    [my_shortcode]

    What could be the reason?

    • This reply was modified 8 years, 1 month ago by avense.

    I use the shortcode enabler to be able to make responsive columns in the form. I use a small plugin for those columns and that plugin uses shortcodes. Maybe it depends on what kind of shortcode? What is your shortcode for?

    Thread Starter avense

    (@avense)

    I want to use different shortcodes, in this case an example:

    function my_shortcode_func() {
        return 'My shortcode works!';
    }
    add_shortcode( 'my_shortcode', 'my_shortcode_func' );
    • This reply was modified 8 years, 1 month ago by avense.

    I use the shortcodes in the form itself, not in the output. Could that be the reason?

    Thread Starter avense

    (@avense)

    Perhaps the reason for this.
    But the form itself does not work: https://prntscr.com/cq3ujn

    What do you mean that the form does not work? Not at all?

    • This reply was modified 8 years, 1 month ago by MarionWante.

    I use shortcodes in the form itself like this example.
    <div>
    [bscolumns class=”one_fifth”][/bscolumns][bscolumns class=”one_fifth”][/bscolumns][bscolumns class=”one_fifth”][/bscolumns][bscolumns class=”one_fifth”][/bscolumns][bscolumns class=”one_fifth_last”][/bscolumns][bscolumns class=”clear”][/bscolumns]
    </div>

    These shortcodes are for responsive columns, so on the frontend people will see 5 columns next to each other and they can enter their text. But in the e-mail itself I do not use these columns, I send the data in a table.
    From what I read you can use any shortcode in the form (with help of the plugin), but I did not yet try another shortcode from another plugin.

    Thread Starter avense

    (@avense)

    I mean, that using this plugin: “Contact Form 7 Shortcode Enabler”, I do not work shortcodes in the body of the message and also in the form itself: https://prntscr.com/cq3ujn

    Do you work shortcodes in this plugin as you put them?

    P.S. Sorry for my English, I use Google translator

    • This reply was modified 8 years, 1 month ago by avense.

    I am sorry that I cannot help you, I do not have enough information to see why the plugin Shortcode Enabler does not work for you. I downloaded that plugin because at first the plugin for the columns did not work in the form, and after installing the Shortcode Enabler it was perfect.

    Thread Starter avense

    (@avense)

    Thank you for your answers.
    I posted yet in branch support plug author:
    https://www.ads-software.com/support/topic/shortcode-doesnt-work-25/

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Using shortcodes in the mail message template’ is closed to new replies.