How to display a shorcode in form success message?
-
Is it possible to get a shortcode to display/work as part of a form submission success message?
I’m using the form as an opt-in to a gated content page. Access to the gated page is possible once the plugin’s (Before And After plugin) shortcode is displayed on the page. However, when I place my shortcode within a success message, it is rendered as plain text within the form wrapper, causing the shortcode to not work as intended.
Any suggestions as to how I can get this to work? Maybe a functions.php action? Here’s what the plugin’s developer suggested, but I’m not sure on how to implement it: “If there is a hook / action that is fired on Mautic forms when the form is submitted, you could attach a function to that that runs do_shortcode(“[complete_goal NNN]”); when this particular form is submitted.”
Thanks.
- The topic ‘How to display a shorcode in form success message?’ is closed to new replies.