Episerver Forms - Include IF/ELSE in Email template

Vote:
 

Hi,

Is it currently possible to add an IF/ELSE logic in email templates for Episerver.Forms?

The email I want to setup in one of the forms will show varying content, based on the user-selected dropdown value in the form.

I tried setting up the dropdown field to store the content-specific HTML in the value but validation says it can't take any comma's.

Any help would be appreciated!

Kind regards,

Nicola

#178327
May 09, 2017 2:32
Vote:
 

Hi,

  Has anyone found a way around IF/Else in the Email template?

Thanks,

Rams

#279399
Apr 28, 2022 10:45
Vote:
 

You could use the Placeholder API to achieve this by extending the DefaultPlaceHolderProvider. Conditional logic can be added in your custom implementation to set your form field placeholder value to specific HTML based on the form field value.

Refer to documentation https://docs.developers.optimizely.com/content-cloud/v1.2.0-forms/docs/placeholder-api

This blog shows an example of how to extend the DefaultPlaceHolderProvider https://devblog.gosso.se/2017/02/customize-summary-in-emails-from-episerver-forms/

#280878
May 25, 2022 22:18
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.