Get form control by field id
I am trying to read the values stored in a dropdown list form control. i am using the following code
var sfform = FormsManager.GetManager().GetFormByName("sf_feedback");
var control = sfform.Controls;
but i am having a problem getting the control from the form by it's field name
any help ??
Hi Salma,
Please refer to the following code - what it does is to retrieve the values in sf_test form for the submitted dropdownlist control, called formdropdownlist1:
FormsManager formsManager = FormsManager.GetManager();
var forms = formsManager.GetForms().Where(f => f.Name == "sf_test");
foreach (var form in forms)
var records = formsManager.GetFormEntries(form);
foreach (var record in records)
FormEntry fe = (FormEntry)record;
var Value1 = fe.GetValue("formdropdownlist1");
Hello Victor,
How can I get only fields that shows up in the form, that is how can I just pick up the values of the fields excluding IP, DateSubmitted, ID etc?
Hello Saad,
I could not really understand your request. Can you be more specific in describing the user - case scenario you want to achieve?
Best wishes,
Victor Velev
the Telerik team