Based on the free plugin I have created a function that dynamically changes the content of the confirmation message $form->options['success_msg'] through the frm_success_filter hook. This works in my development environment with the free plugin. But when uploading it to the production environment, where the pro version is installed, the message is not changed. The code is something like:
add_filter('frm_success_filter', 'my_custom_function', 10, 2); function my_custom_function($type, $form) { $type = 'message'; $form->options['success_msg'] = "My custom message"; // In the print of $form the content of success_msg appears changed to "My custom message" print_r($form); return $type; }
But the output on the confirmation page is the default message. Anyone can help?
Thanks in advance
I solved the problem by removing:
return $type;
And the modifyed message is displayed.
I have developed my code from samples at https://formidableforms.com/knowledgebase/frm_success_filter/ include . It seems that all the examples on this page are wrong because they all include "return $type"
Please login or Register to submit your answer