Portal Engine Questions on portal engine and web parts.
Version 5.x > Portal Engine > Getting value;name pairs from a dropdownlist in a bizform View modes: 
User avatar
Member
Member
jomarshall-petsafe - 3/23/2011 3:22:42 PM
   
Getting value;name pairs from a dropdownlist in a bizform
Is there an API call to grab the predefined value;name pairs out of a bizform field? If there is no API call then what database table can I find them in?

User avatar
Kentico Developer
Kentico Developer
kentico_ivanat - 3/28/2011 9:16:00 AM
   
RE:Getting value;name pairs from a dropdownlist in a bizform
Hi,

here is the code example:


Here is the code example:

// 2448 is an ID of the class defining your bizform, you can find this id in the CMS_Class table, look for the row where classname is starting with BizForm

DataClassInfo classInfo = DataClassInfoProvider.GetDataClass(2448);
FormInfo formInfo = new FormInfo(classInfo.ClassFormDefinition);
FormFieldInfo field = formInfo.GetFormField("bizformFieldCodeName");
Hashtable hs = field.Settings;

string pairs = hs["options"].ToString();



This code returns string containing definition of options.

Best regards,
Ivana Tomanickova