• Resolved code_

    (@amcollaborazioni)


    I was looking for a way to show a portion of html in the mail based on the conditional field that the user chooses on the form, let me explain:

    example: I have two groups:

    [group A]
    dynamichidden FIRST_NAME “CF7_get_post_var key=’META_KEY_NAME'”
    [/group]

    [group B]
    dynamichidden SURNAME “CF7_get_post_var key=’META_KEY_SURNAME'”
    [/group]

    in the mail template i have:

    [A]
      [FIRST_NAME]
    [/A]
    
    [B]
      [SURNAME]
    [/B]

    now if i want show a portion of html, in this mode:

    [A]
    <tr style="border-collapse:collapse;">
       <td align="left" style="padding:0;Margin:0;padding-top:10px;padding-left:35px;padding-right:35px;background-position:left top;">
          <table width="100%" cellspacing="0" cellpadding="0" style="mso-table-lspace:0pt;mso-table-rspace:0pt;border-collapse:collapse;border-spacing:0px;">
             <tr style="border-collapse:collapse;">
                <td width="530" valign="top" align="center" style="padding:0;Margin:0;">
                   <table style="mso-table-lspace:0pt;mso-table-rspace:0pt;border-collapse:collapse;border-spacing:0px;border-top:3px solid #EEEEEE;border-bottom:3px solid #EEEEEE;" width="100%" cellspacing="0" cellpadding="0">
                      <tr style="border-collapse:collapse;">
                         <td bgcolor="#eeeeee" align="left" style="Margin:0;padding-top:10px;padding-bottom:10px;padding-left:10px;padding-right:10px;">
                            <table style="mso-table-lspace:0pt;mso-table-rspace:0pt;border-collapse:collapse;border-spacing:0px;width:500px;" class="cke_show_border" cellspacing="1" cellpadding="1" border="0" align="left">
                               <tr style="border-collapse:collapse;">
                                  <td width="80%" style="padding:0;Margin:0;">
                                     <h4 style="Margin:0;line-height:120%;mso-line-height-rule:exactly;font-family:'open sans', 'helvetica neue', helvetica, arial, sans-serif;">
                                        TITLE:
                                     </h4>
                                  </td>
                                  <td width="20%" style="padding:0;Margin:0;">
                                     <h4 style="Margin:0;line-height:120%;mso-line-height-rule:exactly;font-family:'open sans', 'helvetica neue', helvetica, arial, sans-serif;">
                                         [FIRST_NAME]<br>
                                     </h4>
                                  </td>
                               </tr>
                            </table>
                         </td>
                      </tr>
                   </table>
                </td>
             </tr>
          </table>
       </td>
    </tr>
    [/A]

    and

    [B]
    <tr style="border-collapse:collapse;">
       <td align="left" style="padding:0;Margin:0;padding-top:10px;padding-left:35px;padding-right:35px;background-position:left top;">
          <table width="100%" cellspacing="0" cellpadding="0" style="mso-table-lspace:0pt;mso-table-rspace:0pt;border-collapse:collapse;border-spacing:0px;">
             <tr style="border-collapse:collapse;">
                <td width="530" valign="top" align="center" style="padding:0;Margin:0;">
                   <table style="mso-table-lspace:0pt;mso-table-rspace:0pt;border-collapse:collapse;border-spacing:0px;border-top:3px solid #EEEEEE;border-bottom:3px solid #EEEEEE;" width="100%" cellspacing="0" cellpadding="0">
                      <tr style="border-collapse:collapse;">
                         <td bgcolor="#eeeeee" align="left" style="Margin:0;padding-top:10px;padding-bottom:10px;padding-left:10px;padding-right:10px;">
                            <table style="mso-table-lspace:0pt;mso-table-rspace:0pt;border-collapse:collapse;border-spacing:0px;width:500px;" class="cke_show_border" cellspacing="1" cellpadding="1" border="0" align="left">
                               <tr style="border-collapse:collapse;">
                                  <td width="80%" style="padding:0;Margin:0;">
                                     <h4 style="Margin:0;line-height:120%;mso-line-height-rule:exactly;font-family:'open sans', 'helvetica neue', helvetica, arial, sans-serif;">
                                        TITLE:
                                     </h4>
                                  </td>
                                  <td width="20%" style="padding:0;Margin:0;">
                                     <h4 style="Margin:0;line-height:120%;mso-line-height-rule:exactly;font-family:'open sans', 'helvetica neue', helvetica, arial, sans-serif;">
                                         [SURNAME]<br>
                                     </h4>
                                  </td>
                               </tr>
                            </table>
                         </td>
                      </tr>
                   </table>
                </td>
             </tr>
          </table>
       </td>
    </tr>
    [/B]

    when I go to fill out the form in the mail I can’t find either of the two results. And it doesn’t show me any portion of html code, simply white.
    Why?

    • This topic was modified 6 years, 9 months ago by code_.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)

The topic ‘show html portion based on the conditional choice’ is closed to new replies.