Usually to access field value in code, Value property of AdaptedControlResult class is used.
For any list or complex types of fields, the Value property normally contains extra information.
For e.g., A WFFM form has a check-box list and the values for its items are 1,2,3,4,5. User selects 1,2,3 and submits the form.
Then in the server-side code the value of this field is:
<item>1</item><item>2</item><item>3</item>
To get a simple value with out item tags then GetSitecoreStyleValue method of FieldReflectionUtil class can be used.
Example code snippet:
AdaptedResultList fields; // Get the form field by specifying the field name AdaptedControlResult formField = fields.GetEntryByName("fieldName"); // complex value with item tags string fieldValue = formField.Value; // simple value without item tags fieldValue = Sitecore.Form.Core.Utility.FieldReflectionUtil.GetSitecoreStyleValue(formField.FieldID, fieldValue);
BottomLine: Use FieldReflectionUtil class to get simplified version of form field values.
Borgata Hotel Casino & Spa - JTR Hub
ReplyDeleteLocated in gri-go.com Atlantic City, Borgata 메이저 토토 사이트 Hotel Casino & herzamanindir.com/ Spa offers the finest in www.jtmhub.com amenities and entertainment. It 메이피로출장마사지 also provides a seasonal outdoor swimming