• Resolved Daniel

    (@ddumondgmailcom)


    Hello,

    I’m using the “Mail” and “Mail (2)” templates to send both an email to the admin and a receipt to the user.

    I copy any paste the exact code in both templates and get different results in my email.

    Any clue how this is possible? It first I thought it was a cache issue, but I resolved that it wasn’t.

    In Mail Template, the following code:

    <td>[dinghy]
          [group-dinghy]
          <table>
            <tr>
              <td>Make/Model:</td>
              <td>[dinghy-make-model]</td>
            </tr>
          </table>
          [/group-dinghy]</td>

    Produces this in the email:

    Do you have a dinghy?	No
    [group-dinghy]
    Make/Model:
    [/group-dinghy]

    Whereas the same code in Mail (2) Template:

    <td>[dinghy]
          [group-dinghy]
          <table>
            <tr>
              <td>Make/Model:</td>
              <td>[dinghy-make-model]</td>
            </tr>
          </table>
          [/group-dinghy]</td>

    Produces this in the email:

    Do you have a dinghy?	No
    

    Thanks!

    • This topic was modified 7 years, 9 months ago by Daniel.
Viewing 15 replies - 1 through 15 (of 25 total)
  • Plugin Author Jules Colle

    (@jules-colle)

    Just tested and it’s working fine here. https://bdwm.be/wpcf7cf/dinghy/

    (enter your own email address to receive both Mail 1 and Mail 2)

    Could you share your full form code, email codes and conditions so I can test with your entire form?

    Plugin Author Jules Colle

    (@jules-colle)

    oh wait.. Something seems off. It worked when I first tested it but for some reason the email is weird now too.. I’ll look into it

    Thread Starter Daniel

    (@ddumondgmailcom)

    Thank you! Just to add one more thing… The email also produces shortcodes for the other groups after this incident… The ones prior are fine.

    If you need me to send you all parts in completion, I will be happy to do so.

    Thank you again for your help! ??

    Dan

    Thread Starter Daniel

    (@ddumondgmailcom)

    I’m having the same problem with a completely different form.

    If it will help you trouble shoot, here are all the parts.

    FORM

    <h2>Organizer Information</h2>
    <table>
    <col style="width: 180px;">
    <col style="width: auto;">
    <tr>
    <td>Host Name:</td>
    <td>[text* host-name]</td>
    </tr>
    <tr>
    <td>Host Email Address:</td>
    <td>[email* host-email]</td>
    </tr>
    <tr>
    <td>Host Phone #:</td>
    <td>[tel* host-tel]</td>
    </tr>
    </table>
    
    <h2>Event Information</h2>
    <table style="border: none; margin: 0;">
    <col style="width: 180px;">
    <col style="width: auto;">
    <tr>
    <td>Name of Organization:</td>
    <td>[text organization placeholder "Optional"]</td>
    </tr>
    <tr>
    <td>Event Date:</td>
    <td>[date* event-date placeholder "YYYY-MM-DD"]</td>
    </tr>
    <tr>
    <td>Start Time:</td>
    <td>[text* start-time]</td>
    </tr>
    <tr>
    <td>End Time:</td>
    <td>[text* end-time]</td>
    </tr>
    <tr>
    <td>No. of Non-Member Guests:</td>
    <td>[number* guest-number max:100]</td>
    </tr>
    </table>
    <table>
    <col style="width: auto;">
    <col style="width: 120px;">
    <tr>
    <td>Does the number of guests (non-members) invited fall within the scope as laid out in the current SYC policies?</td>
    <td>[checkbox* policy-scope exclusive "Yes" "No"]</td>
    </tr>
    <tr style="border: none; padding: 0;">
    <td style="border: none; padding: 0;" colspan="2">[group group-policy-scope]<table style="border: none; margin: 0;">
    <col style="width: auto;">
    <col style="width: 120px;">
    <tr>
    <td><strong>If No,</strong> are there other SYC members in good standing who will be attending and are willing to also accept all responsibility as laid out above for hosting this event? Member(s) signature also required below and MUST attend.</td>
    <td>[checkbox* member-responsibility exclusive "Yes" "No"]</td>
    </tr>
    </table>[/group]</td>
    </tr>
    <tr>
    <td>Will you require use of club facilities and equipment (eg. Round Room, Front Porch, Junior Lounge)?[group group-club-facilities]
    
    <strong>Please explain:</strong>
    [textarea* please-explain][/group]</td>
    <td>[checkbox* club-facilities exclusive "Yes" "No"]</td>
    </tr>
    <tr>
    <td>Will you require use of the kitchen, supplies and utensils?</td>
    <td>[checkbox* kitchen-use exclusive "Yes" "No"]</td>
    </tr>
    <tr>
    <td>Will you require use of the BBQ?</td>
    <td>[checkbox* bbq-use exclusive "Yes" "No"]</td>
    </tr>
    <tr>
    <td> Will you be bringing in an outside caterer (The sale of alcohol is prohibited)?</td>
    <td>[checkbox* caterer exclusive "Yes" "No"]</td>
    </tr>
    <tr style="border: none; padding: 0;">
    <td style="border: none; padding: 0;" colspan="2">[group group-caterer]<table style="border: none; margin: 0;">
    <col style="width: 200px;">
    <col style="width: auto;">
    <tr>
    <td><strong>Caterers Name</strong></td>
    <td>[text caterers-name placeholder "Optional"]</td>
    </tr>
    </table>[/group]</td>
    </tr>
    <tr>
    <td>Will you be bringing in a DJ/Music?</td>
    <td>[checkbox* dj exclusive "Yes" "No"]</td>
    </tr>
    <tr style="border: none; padding: 0;">
    <td style="border: none; padding: 0;" colspan="2">[group group-dj]<table style="border: none; margin: 0;">
    <col style="width: 200px;">
    <col style="width: auto;">
    <tr>
    <td><strong>DJ's Name</strong></td>
    <td>[text dj-name placeholder "Optional"]</td>
    </tr>
    </table>[/group]</td>
    </tr>
    <tr>
    <td colspan="2">Please provide a brief outline/plan of your proposed event?
    [textarea* outline]
    </td>
    </tr>
    <tr>
    <td colspan="2">With whom have you been in communication about this event thus far?
    [textarea* communication]
    </td>
    </tr>
    </table>
    
    [submit "Submit Form"]

    MAIL

    <h2>Organizer Information</h2>
    <table>
    <col style="width: 180px;">
    <col style="width: auto;">
    <tr>
    <td>Host Name:</td>
    <td>[text* host-name]</td>
    </tr>
    <tr>
    <td>Host Email Address:</td>
    <td>[email* host-email]</td>
    </tr>
    <tr>
    <td>Host Phone #:</td>
    <td>[tel* host-tel]</td>
    </tr>
    </table>
    
    <h2>Event Information</h2>
    <table style="border: none; margin: 0;">
    <col style="width: 180px;">
    <col style="width: auto;">
    <tr>
    <td>Name of Organization:</td>
    <td>[text organization placeholder "Optional"]</td>
    </tr>
    <tr>
    <td>Event Date:</td>
    <td>[date* event-date placeholder "YYYY-MM-DD"]</td>
    </tr>
    <tr>
    <td>Start Time:</td>
    <td>[text* start-time]</td>
    </tr>
    <tr>
    <td>End Time:</td>
    <td>[text* end-time]</td>
    </tr>
    <tr>
    <td>No. of Non-Member Guests:</td>
    <td>[number* guest-number max:100]</td>
    </tr>
    </table>
    <table>
    <col style="width: auto;">
    <col style="width: 120px;">
    <tr>
    <td>Does the number of guests (non-members) invited fall within the scope as laid out in the current SYC policies?</td>
    <td>[checkbox* policy-scope exclusive "Yes" "No"]</td>
    </tr>
    <tr style="border: none; padding: 0;">
    <td style="border: none; padding: 0;" colspan="2">[group group-policy-scope]<table style="border: none; margin: 0;">
    <col style="width: auto;">
    <col style="width: 120px;">
    <tr>
    <td>Are there other SYC members in good standing who will be attending and are willing to also accept all responsibility as laid out above for hosting this event?</td>
    <td>[checkbox* member-responsibility exclusive "Yes" "No"]</td>
    </tr>
    </table>[/group]</td>
    </tr>
    <tr>
    <td>Will you require use of club facilities and equipment (eg. Round Room, Front Porch, Junior Lounge)?[group group-club-facilities]
    
    <strong>Please explain:</strong>
    [textarea* please-explain][/group]</td>
    <td>[checkbox* club-facilities exclusive "Yes" "No"]</td>
    </tr>
    <tr>
    <td>Will you require use of the kitchen, supplies and utensils?</td>
    <td>[checkbox* kitchen-use exclusive "Yes" "No"]</td>
    </tr>
    <tr>
    <td>Will you require use of the BBQ?</td>
    <td>[checkbox* bbq-use exclusive "Yes" "No"]</td>
    </tr>
    <tr>
    <td> Will you be bringing in an outside caterer (The sale of alcohol is prohibited)?</td>
    <td>[checkbox* caterer exclusive "Yes" "No"]</td>
    </tr>
    <tr style="border: none; padding: 0;">
    <td style="border: none; padding: 0;" colspan="2">[group group-caterer]<table style="border: none; margin: 0;">
    <col style="width: 200px;">
    <col style="width: auto;">
    <tr>
    <td><strong>Caterers Name</strong></td>
    <td>[text caterers-name placeholder "Optional"]</td>
    </tr>
    </table>[/group]</td>
    </tr>
    <tr>
    <td>Will you be bringing in a DJ/Music?</td>
    <td>[checkbox* dj exclusive "Yes" "No"]</td>
    </tr>
    <tr style="border: none; padding: 0;">
    <td style="border: none; padding: 0;" colspan="2">[group group-dj]<table style="border: none; margin: 0;">
    <col style="width: 200px;">
    <col style="width: auto;">
    <tr>
    <td><strong>DJ's Name</strong></td>
    <td>[text dj-name placeholder "Optional"]</td>
    </tr>
    </table>[/group]</td>
    </tr>
    <tr>
    <td colspan="2">Please provide a brief outline/plan of your proposed event?
    [textarea* outline]
    </td>
    </tr>
    <tr>
    <td colspan="2">With whom have you been in communication about this event thus far?
    [textarea* communication]
    </td>
    </tr>
    </table>
    
    [submit "Submit Form"]

    MAIL (2)

    Hello [host-name],
    
    We have received your Event Request Form. Thank you for your submission.
    
    Below is a copy of your results:
    
    <h2>Organizer Information</h2>
    <table>
    <tr>
    <td>Host Name:</td>
    <td>[host-name]</td>
    </tr>
    <tr>
    <td>Host Email Address:</td>
    <td>[host-email]</td>
    </tr>
    <tr>
    <td>Host Phone #:</td>
    <td>[host-tel]</td>
    </tr>
    </table>
    
    <h2>Event Information</h2>
    <table>
    <tr>
    <td>Name of Organization:</td>
    <td>[organization]</td>
    </tr>
    <tr>
    <td>Event Date:</td>
    <td>[event-date]</td>
    </tr>
    <tr>
    <td>Start Time:</td>
    <td>[start-time]</td>
    </tr>
    <tr>
    <td>End Time:</td>
    <td>[end-time]</td>
    </tr>
    <tr>
    <td>No. of Non-Member Guests:</td>
    <td>[guest-number]</td>
    </tr>
    </table>
    <table>
    <tr>
    <td>Does the number of guests (non-members) invited fall within the scope as laid out in the current SYC policies?</td>
    <td>[policy-scope]</td>
    </tr>
    <tr>
    <td>[group-policy-scope]<table>
    <tr>
    <td>Are there other SYC members in good standing who will be attending and are willing to also accept all responsibility as laid out above for hosting this event?</td>
    <td>[member-responsibility]</td>
    </tr>
    </table>[/group-policy-scope]</td>
    </tr>
    <tr>
    <td>Will you require use of club facilities and equipment (eg. Round Room, Front Porch, Junior Lounge)?[group-club-facilities]
    <strong>Explanation:</strong>
    [please-explain][/group-club-facilities]</td>
    <td>[club-facilities]</td>
    </tr>
    <tr>
    <td>Will you require use of the kitchen, supplies and utensils?</td>
    <td>[kitchen-use]</td>
    </tr>
    <tr>
    <td>Will you require use of the BBQ?</td>
    <td>[bbq-use]</td>
    </tr>
    <tr>
    <td>Will you be bringing in an outside caterer (The sale of alcohol is prohibited)?</td>
    <td>[caterer]</td>
    </tr>
    <tr>
    <td>[group-caterer]<table>
    <tr>
    <td>Caterers Name</td>
    <td>[caterers-name]</td>
    </tr>
    </table>[/group-caterer]</td>
    </tr>
    <tr>
    <td>Will you be bringing in a DJ/Music?</td>
    <td>[dj]</td>
    </tr>
    <tr>
    <td colspan="2">[group-dj]<table>
    <tr>
    <td>DJ's Name</td>
    <td>[dj-name]</td>
    </tr>
    </table>[/group-dj]</td>
    </tr>
    <tr>
    <td colspan="2">Outline/plan of proposed event:
    [outline]
    </td>
    </tr>
    <tr>
    <td colspan="2">With whom have you been in communication about this event thus far?
    [communication]
    </td>
    </tr>
    </table>
    
    --
    This e-mail was sent from a contact form on SYC

    These are both checked on all:
    – Exclude lines with blank mail-tags from output
    – Use HTML content type

    CONDITIONAL FIELDS

    if dj equals Yes then show group-dj
    if caterer equals Yes then show group-caterer
    if club-facilities equals Yes then show group-club-facilities
    if policy-scope equals Yes then show group-policy-scope

    In this case, the shortcode is appearing in my inbox from “Mail” section, but looks fine in my inbox from the “Mail (2)” Section — and again, it was copied and pasted so the 2 are identical.

    Thanks again for your help with this! ??

    Dan

    Thread Starter Daniel

    (@ddumondgmailcom)

    Hello,

    I just wanted to follow up on this — curious if this is still a relevant issue that’s being looked in to as I’m eagerly hoping for a solution.

    If there’s anything I can do to help, please let me know.

    Thanks in advance.
    Dan

    Plugin Author Jules Colle

    (@jules-colle)

    Hi, the first issue is solved.

    Concerning your second message:

    in the mail 1 you are still using codes like this

    [group group-something] … [/group]

    You should replace all these by

    [group-something] … [/group-something]

    Thread Starter Daniel

    (@ddumondgmailcom)

    Nice catch Jules!

    I must have caught it myself (after the fact) as it was fixed when I went back in there.

    Still the problem remains…

    The “Mail 1” spits out this:
    Will you require use of club facilities and equipment (eg. Round Room, Front Porch, Junior Lounge)?[group-club-facilities]

    “Mail 2” looks perfect!

    I got excited when I noticed an update to the plugin today… But I guess this issue still remains a mystery.

    Where you able to reproduce the problem?

    Plugin Author Jules Colle

    (@jules-colle)

    Can you post the exact email 1 code again, so I can reproduce it exactly?

    Plugin Author Jules Colle

    (@jules-colle)

    Hey Daniel, did you manage to solve this?

    Thread Starter Daniel

    (@ddumondgmailcom)

    Hey Jules,

    I’m on vacation in Cuba right now with very poor internet access… I don’t have the code handy at the he moment, but I can assure that mail 1/2 are you the same.

    The problem still exists last tweet me I tested it, can you confirm the same?

    Plugin Author Jules Colle

    (@jules-colle)

    I’ve created the exact same setup, made sure to copy mail-2 exactly to mail-1 and I received both emails identically without an error.

    https://bdwm.be/wpcf7cf/daniel/

    Thread Starter Daniel

    (@ddumondgmailcom)

    Hey Jules,

    Thanks for your help with this! I sent you a test email directly from my site.

    I mentioned something about the the date selector which which I activated through the following code:

    // Displays CF7 Calendar //
    add_filter( 'wpcf7_support_html5_fallback', '__return_true' );

    And when I remove this from functions.php, all the hidden fields appear on front end… Could this have something to do with it?

    I also have this code in there:

    // ALLOW SHORTCODES IN CONTACT FORM 7  //
    function shortcodes_in_cf7( $form ) {
    	$form = do_shortcode( $form );
    	return $form;
    }
    add_filter( 'wpcf7_form_elements', 'shortcodes_in_cf7' );
    

    But when I remove it the problem still exists, so I doubt it related.

    Thanks,
    Dan

    Plugin Author Jules Colle

    (@jules-colle)

    I honestly don’t know. It all seems to be working on my site. Could you set up a test site where you have the problem and email me the things I need?

    Hey, Jules, I’m back ?? I seem to be having a similar issue. In my email (both 1 and 2), I am getting all the information in the body that I want, but at the top of the email I see this:

    [other-affiliate]
    
    [/other-affiliate]
    
    [export-control-group]
    
    [/export-control-group]
    
    [china-assurance-group]
    
    [/china-assurance-group]
    
    [student-tracking-group]
    
    [/student-tracking-group]
    
    [student-awardee-group]
    
    [/student-awardee-group]
    
    [student-authorization-group]
    
    [/student-authorization-group]
    
    [oepm-report-group]
    
    [/oepm-report-group]
    
    [final-report-group]
    
    [/final-report-group]
    
    [matching-certification-group]
    
    [/matching-certification-group]
    
    [invoice-group]
    
    [/invoice-group]
    
    [other-group]
    
    [/other-group]
    
    [publications-group]
    
    [/publications-group]

    All the fields below are filled in and visible, but I certainly don’t want those open/closing tags in the email. Do you know why this might be happening?

    I will give you more detail. I have a form which contains a list of checkboxes. If a box is checked, an upload field appears below the checkboxes so that the user can upload the appropriate document. Each check box has an accompanying upload field.

    The email that is sent to the form owner has an html table that shows the results. The files are at the bottom of the email, and in the html table the file name is listed next to the type of document, i.e., Final Report File Name | whatever.pdf.

    In the email code, I have the group tags around the rows (tr) that display the particular field. The idea being, if the box is not click and there is no document, i.e., that particular upload field is invisible on the form, then the row is not shown in the table.

    What is happening instead is that the row is there, the field in the second column is blank, and the short code is listed at the top of the email. Does that clearly paint the picture? I will put an excerpt of the email code below:

    <tr height="26">
    <td colspan="2">[deliverable-options]</td>
    </tr>
    
    [export-control-group]
    <tr height="26">
    <td><strong>Export Control File Name</strong></td>
    <td>[export-control-file]</td>
    </tr>
    [/export-control-group]
    
    [china-assurance-group]
    <tr height="26">
    <td><strong>China Assurance File Name</strong></td>
    <td>[china-assurance-file]</td>
    </tr>
    [/china-assurance-group]
    
Viewing 15 replies - 1 through 15 (of 25 total)
  • The topic ‘Shortcode appearing in Mail, but not Mail (2)’ is closed to new replies.