evanmcd
-
3/9/2010 3:15:45 PM
RE:Specifying an alternate bizform from a BizForm control
Funny that the reply I got in my email didn't show up here.
Here it is for anyone following the full thread.
Hello. So, you want to use a bizform as inline control and call it with alternativeform property? If so, this is not support by default, but you can 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|...^}
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^}
Best Regards, Radek Macalik
|