I'm trying to create an email notification for a post form that changes content according to conditional statements but they're not working as expected.
I have a post form (create & edit versions) that contains an 'arrival time' and a 'collection time'. When a customer submits the form, its status is set to pending review. A variety of scenarios can present themselves regarding the arrival and collection times; the customer may put an incorrect time on the form to start with or either they or I may amend one or both of the times at a later date. So I've created a radio field called 'time types' with options of 'Both Accepted', 'Arrival Changed', 'Collection Changed', 'Neither Accepted', 'Arrival Amended', Collection Amended', Both Amended'. When a form is first submitted or if the customer amends the form later, I select one of the first four options, depending on whether the times are as agreed. If I amend either the arrival or collection time at a later date, I select one of the last three options.
I've built my conditional statements around the 'time types' field and the content of the email notification (which is the same for both the create and edit versions of the form) looks like this (with actual message text replaced for clarity):-
[wpv-conditional if="( $(wpcf-time-types) eq 'Accepted' )"]
<p>I'm pleased to inform you that your booking is now fully confirmed.</p>
[/wpv-conditional]
[wpv-conditional if="( $(wpcf-time-types) eq 'Arrival Changed' )"]
<p>arrival time's been changed</p>
[/wpv-conditional]
[wpv-conditional if="( $(wpcf-time-types) eq 'Collection Changed' )"]
<p>collection time's been changed</p>
[/wpv-conditional]
[wpv-conditional if="( $(wpcf-time-types) eq 'Both Changed' )"]
<p>arrival & collection times have been changed</p>
[/wpv-conditional]
[wpv-conditional if="( $(wpcf-time-types) eq 'Accepted' ) OR ( $(wpcf-time-types) eq 'Arrival Changed' ) OR ( $(wpcf-time-types) eq 'Collection Changed' ) OR ( $(wpcf-time-types) eq 'Both Changed' )"]
<p>general information if arrival/collection times not being amended by me after initial confirmation</p>
[/wpv-conditional]
[wpv-conditional if="( $(wpcf-time-types) eq 'Arrival Amended' )"]
<p>this is why I've changed the arrival time</p>
[/wpv-conditional]
[wpv-conditional if="( $(wpcf-time-types) eq 'Collection Amended' )"]
<p>this is why I've changed your collection time</p>
[/wpv-conditional]
[wpv-conditional if="( $(wpcf-time-types) eq 'Both Amended' )"]
<p>this is why i've changed both your arrival & collection times</p>
[/wpv-conditional]
Can you see any reason why these statements shouldn't produce the output required please?