1

I am running Solspace Freeform 4.x for a fairly lengthy volunteer signup form. I would like to provide a record back to the user for those items they sign up up for. However by using the {all_form_fields_string} in the notification template I get all fields returned in the email notification whether it has a value associated with it or not. Is there a way to return only those fields that have a value? If so how?

Thanks.

1 Answer 1

1

In the Freeform control panel you can create a custom notification and then use conditionals in the notification template.

{if your_form_field}
   Your form field is: {your_form_field}
{/if}

Just be sure to edit that form's settings in the Freeform control panel and choose that notification template.

2
  • Hi Alex, this looks good. Is there any way to do this universally? I ask only because this particular form has a lot of fields (50+). Thanks.
    – forrest
    Sep 9, 2013 at 17:57
  • Yeah, I hear you. That would be very nice, but no, not that I know of. A shortcut could be to get the field names with SQL (SELECT field_name FROM exp_freeform_fields) and then paste them into Sublime Text and do multi-line editing.
    – Alex Kendrick
    Sep 9, 2013 at 18:18

Your Answer

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

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