if condition in eMail template

Collapse
X
 
  • Time
  • Show
Clear All
new posts

  • esforim
    commented on 's reply
    Any luck? I probably want to add that if statement in future too.

  • vps
    replied

    We have the same problem. Handleable conditions do not work in normal email templates. Is there a workaround here? Click image for larger version

Name:	handlebars.PNG
Views:	922
Size:	79.5 KB
ID:	54270 Example:
    HTML Code:
        <!-- {{#if Lead.lastName}} --> <p> Dear Mr. {Lead.lastName}},</p> <!-- {{else}} --> <p>Dear Madam or Sir,</p> <!-- {{/if}} -->
    Attached Files

    Leave a comment:


  • Darkcromb
    replied
    It doesn't work for me.
    I have in my code editor :
    <p>{Person.name}</p><p>{Call.contact.name}</p><p>{Call.contact.estusager}<br></p><p>Concerne {Call.name}&nbsp;<span style="color: rgb(51, 51, 51);">(
    <!-- {{#ifEqual Call.contact.estusager 1}} -->
    Usager du social
    <!-- {{/ifEqual}} -->
    )</span></p><p>Type : {Call.type} Niveau d'urgence :&nbsp;{Call.urgence}</p><p>Objet : {Call.name}<br></p><p>Description :&nbsp;{Call.description}&nbsp;</p>

    (Call.contact.estusager is a tinyInt(1))

    When Call.contact.estusager=0, "Usager du social" is written anyway.
    I tried <!-- {{#ifEqual Call.contact.estusager "1"}} --> <!-- {{#ifEqual Call.contact.estusager '1'}} --> <!-- {{#ifEqual Call.contact.estusager true}} --> but it doesn't work (it's working in a PDF template)

    What am I doing wrong ?

    Leave a comment:


  • MicKress
    replied
    Great! Thank you!

    Leave a comment:


  • VinhPN
    replied
    In code editor:

    Code:
    <!-- {{#ifEqual field1 'a'}} -->
    b
    <!-- {{/ifEqual}} -->

    Leave a comment:


  • MicKress
    started a topic if condition in eMail template

    if condition in eMail template

    Hi there, is there a possibility to use an if Condition in a body Text of an eMail template? E.g. if field1 = "a" then text = "b"
Working...