Using shortcodes in the mail message template
-
Hello!
How can I do that would be able to use shortcodes in the template mail message?
Thank.
-
Hi, I use a free small plugin for this: Contact Form 7 Shortcode Enabler. Does the job for me.
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 9 years, 7 months 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?
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 9 years, 7 months ago by
avense.
I use the shortcodes in the form itself, not in the output. Could that be the reason?
Perhaps the reason for this.
But the form itself does not work: http://prntscr.com/cq3ujnWhat do you mean that the form does not work? Not at all?
-
This reply was modified 9 years, 7 months 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.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: http://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 9 years, 7 months 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.
Thank you for your answers.
I posted yet in branch support plug author:
https://ww.wp.xz.cn/support/topic/shortcode-doesnt-work-25/ -
This reply was modified 9 years, 7 months ago by
The topic ‘Using shortcodes in the mail message template’ is closed to new replies.