0

I would like to "hide" the empty fields in my admin/user email notifications. Right now it's outputting all of them when I do:

{form:fields}
{field:label} : {field:value}
{/form:fields}

I've tried using conditionals as well but nothing works.

(The Forms module was previously known as DevDemon Forms.)

1 Answer 1

1

Just found out the answer. I had to add quotation marks around the {field:value} conditional. Below is an example.

{form:fields}
{if "{field:value}" != ''}
{field:label} : {field:value}
{/if}
{/form:fields}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.