Portal Engine Questions on portal engine and web parts.
Version 5.x > Portal Engine > Set default values for Email Fields in Bizforms View modes: 
User avatar
Member
Member
ken - 5/20/2010 1:11:20 PM
   
Set default values for Email Fields in Bizforms
I have seen the following kb article:http://devnet.kentico.com/Knowledge-Base/Web-parts---Controls/Setting-default-values-for-BizForm.aspx

It works fine for TextBox fields, but i am running into problems setting values for Email FormControls.

I am unable to cast to the EmailInput object type to set the .Value property.
The error i am receiving is:The type or namespace name 'cmsformcontrols_emailinput_ascx' could not be found (are you missing a using directive or an assembly reference?)

thanks

User avatar
Member
Member
ken - 5/21/2010 9:36:03 AM
   
RE:Set default values for Email Fields in Bizforms
I wasn't able to cast the control to the emailinput_ascx control but i was able to cast the control to the class it inherits from(CMS.FormControls.FormEngineUserControl). The .Value property is on the Parent class so i was able to set the property like this:

((CMS.FormControls.FormEngineUserControl)ctlEmailAddress).Value = mycust.Email;