{"id":17448,"date":"2024-03-12T09:39:31","date_gmt":"2024-03-12T08:39:31","guid":{"rendered":"https:\/\/www.welaunch.io\/en\/?post_type=faq&#038;p=17448"},"modified":"2024-03-12T09:39:31","modified_gmt":"2024-03-12T08:39:31","slug":"custom-email-success-text-per-answered-question","status":"publish","type":"faq","link":"https:\/\/www.welaunch.io\/en\/knowledge-base\/faq\/custom-email-success-text-per-answered-question\/","title":{"rendered":"Custom Email success text per Answered Question"},"content":{"rendered":"<p>When you use our WP Wizard form guide, you may need to send a custom Email text per question \/ answer or even form. For this you can use the below filter with example code:<\/p>\n<pre>\r\nadd_filter( 'wordpress_form_wizard_mail_sent_text', function( $emailSentText, $form_id, $choices_made) {\r\n\r\n    if($form_id == 19939) {\r\n\r\n        $type = 'em';\r\n        if(isset($choices_made[19940])) {\r\n            $typeChoosen = reset($choices_made[19940]);\r\n            if($typeChoosen == 19942) {\r\n                $type = 'tm';\r\n            }\r\n        }\r\n\r\n        if($type == \"em\") {\r\n            $emailSentText = 'Text 1';\r\n        } else {\r\n            $emailSentText = 'Text 2';\r\n        }f\r\n    } elseif($form_id == 20770) {\r\n        $emailSentText = 'Text 3';\r\n    }\r\n\r\n    return $emailSentText;\r\n\r\n}, 20, 3);\r\n\r\n<\/pre>\n","protected":false},"author":1,"featured_media":0,"menu_order":0,"comment_status":"open","ping_status":"closed","template":"","product_cat":[],"class_list":["post-17448","faq","type-faq","status-publish","hentry","faq_topics-wordpress-form-wizard-documentation"],"_links":{"self":[{"href":"https:\/\/www.welaunch.io\/en\/wp-json\/wp\/v2\/faq\/17448","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.welaunch.io\/en\/wp-json\/wp\/v2\/faq"}],"about":[{"href":"https:\/\/www.welaunch.io\/en\/wp-json\/wp\/v2\/types\/faq"}],"author":[{"embeddable":true,"href":"https:\/\/www.welaunch.io\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.welaunch.io\/en\/wp-json\/wp\/v2\/comments?post=17448"}],"version-history":[{"count":1,"href":"https:\/\/www.welaunch.io\/en\/wp-json\/wp\/v2\/faq\/17448\/revisions"}],"predecessor-version":[{"id":17449,"href":"https:\/\/www.welaunch.io\/en\/wp-json\/wp\/v2\/faq\/17448\/revisions\/17449"}],"wp:attachment":[{"href":"https:\/\/www.welaunch.io\/en\/wp-json\/wp\/v2\/media?parent=17448"}],"wp:term":[{"taxonomy":"product_cat","embeddable":true,"href":"https:\/\/www.welaunch.io\/en\/wp-json\/wp\/v2\/product_cat?post=17448"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}