I ran into the same problem. For some reason the snippet doesn’t work in quotes.
This is what I did to get around the problem.
In the text/html I added the snippet to my form.
<form action="https://www......." method="post" enctype="multipart/form-data">
[wbcr_php_snippet id="290"]
In the snippet:
?><input type="hidden" name="Registered" value="<?php echo date('l jS F Y'); ?>" />
Notice how the line starts with a PHP closing tag.
My failed attempt looked like this
HTML:
<form action="https://www......." method="post" enctype="multipart/form-data">
<input type="hidden" name="Registered" value="[wbcr_php_snippet id="290"]" />
Snippet:
echo date('l jS F Y');
It worked outside of quotes but not within.
I hope this helps.
-
This reply was modified 7 years, 6 months ago by
visitmyzoo.
-
This reply was modified 7 years, 6 months ago by
visitmyzoo.
-
This reply was modified 7 years, 6 months ago by
visitmyzoo.
-
This reply was modified 7 years, 6 months ago by
visitmyzoo.
-
This reply was modified 7 years, 6 months ago by
visitmyzoo.
Hi, guys
To use shortcodes inside html attributes, you must escape double quotes, and it is better to use single quotes. Example:
<a title="altphone" href="tel:[wbcr_php_snippet id='3227']">Call me</a>
Do not forget to leave your review about the plugin, it will allow us to make it better and more stable!
Best regards, Alex