We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 29181
    • 480 Posts
    I have a FormIt Contact form. In the email template I would only like to display certain information if a field has been filled out, for example, my template looks like

    <br />[[+name]] ([[+email]]) wrote: <br />
    
    Subject: [[+subject]]<br />
     
    [[+text]]
    <hr />
    
    <strong>Services</strong><br />
    [[+services]]


    I would like it to only display

    <strong>Services</strong><br />
    [[+services]]


    if the services field has been filled out. Can anyone point me in the right direction?

    Cheers,
    Taff
      Adrian Lawley: www.adrianlawley.com
      • 29181
      • 480 Posts
      I was hoping that If would work but either I am doing something wrong...or it doesnt smiley
      [[!If?&subject=`[[+company]]`&operator=`empty`&then=``&else=`Company: [[+company]]`]]


      Thanks for any pointers.
      Taff
        Adrian Lawley: www.adrianlawley.com
      • Have you tried using an output filter?

        [[+services:!empty=`
        <strong>Services</strong>
        [[+services]]`]]
        

          Benjamin Marte
          Interactive Media Developer
          Follow Me on Twitter | Visit my site | Learn MODX
          • 29181
          • 480 Posts
          Thanks very much, awesome!
            Adrian Lawley: www.adrianlawley.com