Hiding text in the email sent by CF7 if a field is empty
-
Hello-
I’m building a form for quotes for a business with around 200 fields, and when fields aren’t filled out I would like to hide both the empty field and the text that would describe the field (such as a label) to keep the returned email pertinent and tidy.
I do not see any native functionality to perform this- I’m willing to extend this via your modules code, but I have one issue. I don’t want to have to create a separate function for each field (looking into using the wpcf7_add_shortcode method you provide, so I wanted to pass the field name to the function called by the shortcode. But from what I see in looking into the class, the only passed array is $tag, which is pre-defined.
Any suggestions? I don’t want to touch the core of your fantastic plugin so it can be updated as needed.
Thanks!
- The topic ‘Hiding text in the email sent by CF7 if a field is empty’ is closed to new replies.