• Resolved itsChimpanzee

    (@chimpanzeeuk)


    Is it possible to configure CF7 to send the ID of the button pressed in the email?

    I want to create a response form where users can enter a short message then click either a “I’m Going” or an “I’m Not Going” button so my code is like this:

    <p>[textarea your-message] </p>
    <p>[submit id:accept "I'm Going"]</p>
    <p>[submit id:decline "I'm Not Going"]</p>

    As you can see, I thought maybe I could use the submit’s ID to distinguish between the two and send this in the email. Can anyone tell me if this is possible?

    I’d considered having a drop-down list or a radio button to choose the response but the two-button option makes for a much nicer layout in my opinion.

    Thanks 🙂

    http://wordpress.org/extend/plugins/contact-form-7/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Takayuki Miyoshi

    (@takayukister)

    You can directly put HTML tag instead of the plugin’s shortcode, like this:

    <p><input type="submit" name="your-submit" value="I'm Going" /></p>
    <p><input type="submit" name="your-submit" value="I'm Not Going" /></p>

    Note that they have name attributes (name value is arbitrary and not important). Also there are no id attributes as they are useless in this case.

    Then, put [your-submit] in your mail body. You can see which button has been used by checking the value.

    Thread Starter itsChimpanzee

    (@chimpanzeeuk)

    Excellent. Thanks very much Takayuki 🙂

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Send submit button ID in email’ is closed to new replies.