Portal Engine Questions on portal engine and web parts.
Version 5.x > Portal Engine > Bizform or Custom Table View modes: 
User avatar
Member
Member
Skip - 6/14/2012 7:11:38 AM
   
Bizform or Custom Table
I am trying to create a bizform but I need to control the email address based on a value entered in one of the form fields. I have looked at modifying the bizform web part but cannot see how I can control the "to" address. Has anyone done this? If this is not possible, I can create a custom table to do this. My next question is can I use a transformation to build the email body.

User avatar
Member
Member
kentico_michal - 6/15/2012 3:56:09 AM
   
RE:Bizform or Custom Table
Hi,

There is a number of ways you can accomplish that. I would like to point you to the following knowledge base article that describes possible solutions: Variant Notification E-mail addresses for On-line forms

Alternatively you can create a custom macro that you use as a To e-mail field. Within the custom macro, you can access fields that user has submitted and based on them, you can return any e-mail address you need. You can use the following code in the custom macro to get a value of some BizForm field:

DataRow row = sender.SourceData[0] as DataRow;
string field = ValidationHelper.GetString( row["<column name>"] , String.Empty );

More information about creating custom macros in R2 can be found here: Macro expression in Kentico CMS R2

In terms of the second question, regrettably, it is not possible to define the email body in the form of a transformation.

Best regards,
Michal Legen