Hello, I am developing a Quiz, a form with 3 questions.
Each question has 3 radio boxes with answers.
I want to send 2 different mail notification, one to congratulate if the responses are correct, the other if the answer(s) are wrong. For this scope i am using Toolset notification email with fields conditions but if answers are OK both messages are sent out.
Im my form id 266, the right answers are:
Q1: answer id=3
Q2: answer id=1
Q3: answer id=3
See in the attached screenshot of the notification setting used to trig the notification.
As already said, if the answers are ok both notifications are sent out, while if responses are wrong only the notification for bad answers is sent. (i have the same issue on other forms)
I also use this code (in function.php) that it works well to redirect the user after the form submission :
if ($form_data['id']==266){
if($_POST['wpcf-recharge-horodateur'] == 3 && $_POST['wpcf-macaron-multizones'] == 1 && $_POST['wpcf-partager-macaron-collegue'] == 3)
{
$url ="/bravo"; // good answers
} else
{
$url = '/dommage'; // bad answers
}
} ;
The redirection works just fine, if the answer is correct (3 - 1 - 3) the user is redirected on the corresponding page.
Thanks for your assistance