Is there a way to have a dynamic notification subject in Sprout Forms via custom fields, eg if I have a field called subject can I use this in the Subject option under Notifications as {{ subject }}?

  • Some progress - was using {{ subject }} when in fact should have been using { subject }. The next question is whether you can have conditional logic (eg if subject then X otherwise Y) Apr 18 '16 at 16:17

Yes. You can use the value of your custom field subject in two ways:

Shorthand Syntax:


Object Syntax

{{ object.subject }}

If you want to perform any conditional logic, you will need to use object syntax for the conditional logic:

{% if object.subject != '' %}{{ object.subject }}{% else %}Fallback{% endif %}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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