Portal Engine Questions on portal engine and web parts.
Version 6.x > Portal Engine > Macro in BizForm Autoresponder View modes: 
User avatar
Member
Member
knottano-gmail - 5/1/2012 2:24:38 AM
   
Macro in BizForm Autoresponder
Hi,

I would like to modify Autoresponder in BizForm with the conditional block like this.


IIF($$Firstname$$ != "", "Hello " + $$Firstname$$, "Hello Guest")

It will say hello follows by name when it's provide or "hello guest" when it's empty.

Is there a way to achieve this?

Thank you.

User avatar
Member
Member
kentico_michal - 5/1/2012 5:18:10 AM
   
RE:Macro in BizForm Autoresponder
Hi,

You would need to create a custom macro in which you can access fields that user has submitted and based on the value of the first name, you can return any text you need. You can use the following code in the custom macro to get the first name:

IDataContainer data = e.Resolver.SourceData[0] as IDataContainer;
string firstName = ValidationHelper( data.GetValue("FirstName"), String.Empty );

More information about creating a custom macro can be found here: Types of macros


Best regards,
Michal Legen