Hey, you can use groups in your email message as well. Just make sure to wrap the relevant fields with the correct group tags. This will make sure that only fields that were visible during form submission will be included in the email message. https://conditional-fields-cf7.bdwm.be/docs/faq/can-i-use-conditional-logic-in-the-email-message/
Appreciate the quick reply. I am sure this simple, but I am not sure I’m totally grasping it yet. Here’s an similar example of a question on the contact form that ends up in the email, even though it wasn’t answered in the contact form:
[group group-964]
Date Flexibility: [select* menu-401 “Only on this date” “Within 1 day” “Within 2 days” “Within 3 days” “Flexible on date”]
[/group]
In the “Mail” section I have “[menu-401]” but I don’t have the “[group-964]” I tried putting in the groups and it wasn’t populating correctly on the email.
Put this in your email message:
[group-964]
Date Flexibility: [menu-401]
[/group-964]
You can also play around with this in the form-tester if you’d like https://conditional-fields-cf7.bdwm.be/form-tester/
-
This reply was modified 3 years, 9 months ago by
Jules Colle.
Let me see if that works….
Changing the group programming to your previous (edited) message causeD the logic to stop working.. I need to figure out how to put that back the way it was.
Here’s another example: https://conditional-fields-cf7.bdwm.be/form-tester/?test-form=Conditional+email+message+%281%29
The logic is pretty simple, but my examples might be a bit too confusing. Sorry for that.
I see what happened – I need to fill out conditional fields again…everything got reset..
-
This reply was modified 3 years, 9 months ago by
presser1.
no… i think you are overthinking it
Likely. I’m going to read everything you sent and see if I can figure it out. Thank you.
Ok, so with your example (thank you) I was able to get it to exclude anything not filled out on the form. Appreciate it.
A couple questions, if you don’t mind. It’s not directly related to your logic plugin, but is there a way to get rid of spaces when I get the email? In other words, areas where I put the group within the email, there’s extra spaces between lines in what I receive in the email. Example:
Line 1
Line 2
(space here)<–want to get rid of the space
(space here)<–want to get rid of the space
Line 3
I’m just trying to tidy up the look and format of what I receive a bit. Also, is there a way to display how dates show in emails? Right now, it’s year, month and day – trying to get month, date and year.
It would be nice is there was 1 line of programming within the mail section to tell it that whatever was filled in the form, display in an email.
Thanks again for your quick help.
You could get rid of unwanted spaces by always opening a new group immediately after closing the previous one.
So for example instead of
[group1]
...
[/group1]
[group2]
...
[/group2]
Do this:
[group1]
...
[/group1][group2]
...
[/group2]
PS: I’ll be implementing an update in a future version to make sure that whitespaces between closing and opening groups will be stripped automatically, but for now you’ll need to rely on this approach