Portal Engine Questions on portal engine and web parts.
Version 5.x > Portal Engine > Multiple parameters in an inline control (BizForm) View modes: 
User avatar
Member
Member
ndeych-gmail - 3/5/2010 8:57:01 AM
   
Multiple parameters in an inline control (BizForm)
I want to display an alternate form as an inline control. I have looked up a couple of tutorials but none of them work on 5.0.8 version.

http://devnet.kentico.com/Knowledge-Base/API-and-Internals/How-to-pass-two-parameters-to-inline-control.aspx

I am missing the "properties" tab all together and when I use this "{ ^BizFormControl|(FormName)ContactUs|(AlternativeForm)xx^}" syntax in the editable text web part, the web part just renders that as html, does not pull in the web part. When I use the %%, it doesnt work either...

What Can I do? Thanks!

User avatar
Kentico Support
Kentico Support
kentico_radekm - 3/9/2010 8:39:25 AM
   
RE:Multiple parameters in an inline control (BizForm)
Hello.

Could you please modify code-behind of bizform inline control in <solution>\CMSModules\Bizforms\InlineControls\BizFormControl.ascx.cs and add this property here:

public string AlternativeFormFullName
{
get
{
return ValidationHelper.GetString(this.GetValue("AlternativeFormFullName"), null);
}
set
{
this.SetValue("AlternativeFormFullName", value);
this.Bizform1.AlternativeFormFullName = value;
}
}

Then you can use this macro to put that inline control on your page together with requested parameter:

{ ^controlname|(property1)value1|(property2)value2|...^ } (without spaces)

Also, in code-behind of \CMSModules\BizForms\InlineControls\BizFormControl.ascx.cs please make sure that your SetupControl() method looks like:

protected void SetupControl()
{
this.Bizform1.FormName = this.FormName;
this.Bizform1.AlternativeFormFullName = this.AlternativeFormFullName;
}

When you call that bizform with alternative form on it, you need to use full path, since Alternative form full name = (ClassName.AlternativeFormName). So, you need to call it classnameOfYourBizform.AlternativeFormName.

For default ContantUs bizform, the classname is bizform.ContantUs.

So, I am calling it this way:

{ ^BizFormControl|(FormName)ContactUs|(AlternativeFormFullName)bizform.ContactUs.Test^ } (without spaces)

This is a little bit different way than in KB you mentioned, but I have tested it and it works. Please let me know if it helped. Thank you.

Best Regards,
Radek Macalik