Try our conversational search powered by Generative AI!

Class XFormFieldStatistic

Helper class to keep track of information for a field.

Inheritance
System.Object
XFormFieldStatistic
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: EPiServer.Web.WebControls
Assembly: EPiServer.dll
Version: 7.19.2
Syntax
public class XFormFieldStatistic

Constructors

XFormFieldStatistic(String)

Constructor for a field.

Declaration
public XFormFieldStatistic(string fieldName)
Parameters
Type Name Description
System.String fieldName

Name of field in form.

Properties

FieldName

The name of the field.

Declaration
public string FieldName { get; }
Property Value
Type Description
System.String

Votes

Gets the aggregated votes.

Declaration
public NameValueCollection Votes { get; }
Property Value
Type Description
System.Collections.Specialized.NameValueCollection

The aggregated votes.

Remarks

Returns a System.Collections.Specialized.NameValueCollection where the form field is the key and the value is the number of votes for the field.

Methods

AddEmptyVote(String)

Adds an empty vote.

Declaration
public void AddEmptyVote(string key)
Parameters
Type Name Description
System.String key

The key that you want to add an empty vote for.

AddVote(String)

Add a field value. Will aggregate identical answers with a counter.

Declaration
public void AddVote(string key)
Parameters
Type Name Description
System.String key

The string value of the field.

Extension Methods