Support » Plugin: Conditional Fields for Contact Form 7 » Groups in Mail and Mail (2) Acting Differently

  • Resolved johnzeiger

    (@johnzeiger)


    Groups in the Message Body of Mail are being rendered differently than in Mail (2).

    If the Message Body is as follows:

    [ack]Acknowledgment Details:
    [email-ack][honored][honored-name][/honored][memorialized][ack-name][/memorialized] <[ack-email]>[/email-ack]
    [post-ack][honored][honored-name][/honored][memorialized][ack-name][/memorialized]
    [ack-address1] [ack-address2]
    [ack-city], [ack-state] [ack-zip][/post-ack][/ack]

    For Mail (2) it is rendered as expected as:

    Acknowledgment Details:
    JZ <ack@yahoo.com>

    But for Mail, group names are included:

    [ack]Acknowledgment Details:
    JZ <ack@yahoo.com>
    [post-ack]JZ

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Jules Colle

    (@jules-colle)

    i’ll check. My first guess is that something is off with the regex I use to parse the message. I’ll spare you the details, but I guess for now you should be able to fix it by changing the group [ack] tot [ackn]

    Or, if you can wait for the update, you don’t have to change anything. (will be in a week or so hopefully)

    Plugin Author Jules Colle

    (@jules-colle)

    Could you share your form code as well please? I’m trying to recreate your problem, but I’m not exactly sure how your form is built up.

    Thread Starter johnzeiger

    (@johnzeiger)

    I changed the body of the mail as follows to get it to work:

    [ack]Acknowledgment To Be Sent To:
    
    [honored][honored-name][/honored][memorialized][ack-name][/memorialized]
    [email-ack][ack-email][/email-ack]
    [post-ack][ack-address1] [ack-address2]
    [ack-city], [ack-state] [ack-zip][/post-ack]
    [/ack]
    Thread Starter johnzeiger

    (@johnzeiger)

    The form code is as follows:

    <h2>Donation Details</h2>
    <div style="margin-left: 10px;">
    <p>Amount*<br />
    [number* donation placeholder "$"]</p>
    
    <p>Type of Gift*</p>
    <p>[radio gift-type default:1 "Honor Someone" "Memorialize Someone"]</p>
    
    [group honored]<p>Name of Person to be Honored*<br />[/group]
    [group memorialized]<p>Name of Person to be Memorialized*<br />[/group]
    [text* honored-name]<br />
    </div>
    
    <h2>Acknowledgment</h2>
    <div style="margin-left: 10px;">
    [group honored]<p>Send Acknowledgment to Person Being Honored?</p>[/group]
    [group memorialized]<p>Send Acknowledgment to Family Member or Friend of Person Being Memorialized?</p>[/group]
    
    <p>[radio ack-type default:1 "no" "via email" "via postal mail"]</p>
    [group ack]
    <div  style="margin-left: 10px;">
    [group memorialized]<p>Name of Family Member or Friend of Person Being Memorialized</p>
    <p>[text ack-name]</p>[/group]
    
    [group email-ack]
    <p>Their Email*<br />
    [email* ack-email]</p>
    [/group]
    
    [group post-ack]
    <p>Their Address*<br />
    [text ack-address1]<br />
    
    Their Address (cont'd)<br />
    [text ack-address2]<br />
    
    Their City*<br />
    [text* ack-city]<br />
    
    Their State*<br />
    [text* ack-state]<br />
    
    Their Zip*<br />
    [text* ack-zip]</p>
    [/group]
    </div>
    [/group]
    </div>
    
    <h2>Your Information</h2>
    <div style="margin-left: 10px;">
    <p>Name*<br />
    [text* full_name]</p>
    
    <p>Email*<br />
        [email* email]</p>
    
    <p>Address*<br />
    [text* address1]<br />
    
    Address (cont'd)<br />
    [text address2]<br />
    
    City*<br />
    [text* city]<br />
    
    State*<br />
    [text* state]<br />
    
    Zip*<br />
    [text* zip]</p>
    
    <p>Phone<br />
        [tel phone]</p>
    
    <p>[checkbox anonymous "I would like to remain anonymous"]</p></div>
    <p>[recaptcha]</p>
    <p>[submit "Donate"]<br />
    After clicking the Donate button, you will be taken to PayPal's website to complete your payment using either your credit/debit card or PayPal account.</p>
    Plugin Author Jules Colle

    (@jules-colle)

    Just to let you know: I stopped investigating this problem, because your form is invalid. You have multiple groups named [group honored] and [group memorialized]. This is invalid code. I will wait until someone can reproduced the problem with valid form code. Because of this and because you managed to solve your problem, I’m marking this as resolved.

    Thread Starter johnzeiger

    (@johnzeiger)

    The form works fine and the original body of the second email worked, but the first email didn’t work even though it was identical to the first…so, the code was handling the 2 emails differently causing the first email to not work

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Groups in Mail and Mail (2) Acting Differently’ is closed to new replies.