Contact Form 7
Conditional Statement in email Message? (2 posts)

  1. twlack
    Posted 4 years ago #

    Is there any way to run PHP in the mail message before sending it?

    I don't want to include a label in the email if the input was left blank on the form.

    if InputName != ''
    Name: [InputName]


  2. allstone
    Posted 4 years ago #

    I'm interested in some conditional possibilities too.

    I have a number of survey questions in a "contact form". Two out of the five answers require my attention.

    I would like to figure out a way to make it so that anytime the "often" or "always" answers come up, they are included in the email, while the other three answers (NULL, "never", and "sometimes") are not included in the email to me.

    Mine would something like:

    if answer includes "often" OR "always", print endif

    Something like that. :)

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Contact Form 7
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic