InputElement Class

InputElement class

The InputElement represents a wrapper that is associated with the HTMLInputElement.

public class InputElement : FormElement<HTMLInputElement>

Properties

NameDescription
getElementType Gets the type of the element.
getHtmlElement
[getId]
[setId] Represents the Id attribute of the input element.
getList Represents a list of options
[getName]
[setName] Represent the name attribute of the input element.
[getType]
[setType] Type of the form control.
[getValue]
[setValue] Represents the String value of the input element that is directly mapped to the ‘value’ attribute.

Methods

NameDescription
addFile(String)This method adds files to the Files collection which will be sent during the next web request.
getCheckboxValue()Returns the checkedness state for the input element with the Checkbox type .
getColorValue()This method is used to get the value as a color. This method is valid if only only type of the input element is “color”
getDateTimeLocalValue()This method is used to get the value as a DateTime object object. This method is valid if only only type of the input element is “datetime-local”
getDateValue()This method is used to get the value as a DateTime object. This method is valid if only only type of the input element is “date”
getEmailValue()This method is used to get the value as an email String object. This method is valid if only only type of the input element is “email”
getMonthValue()This method is used to get the value as a DateTime object. This method is valid if only only type of the input element is “month”
getNumberValue()This method is used to get the value as a number. This method is valid if only only type of the input element is “number”
getPasswordValue()This method is used to get the value as a password String object. This method is valid if only only type of the input element is “password”
getRadioValue()Returns the checkedness state for the input element with the radio type.
getTimeValue()This method is used to get the value as a TimeSpan object. This method is valid if only only type of the input element is “time”
getUrlValue()This method is used to get the value as Url object. This method is valid if only only type of the input element is “url”
getWeekValue()This method is used to get the value as a week String. This method is valid if only only type of the input element is “week”
setCheckboxValue(bool)Sets the checkedness state for the input elemen with the Checkbox type.
setColorValue(Color)This method is used to set color as a value for input element. This method is valid if only the type of the input element is “color”
setDateTimeLocalValue(DateTime)This method is used to set DateTime object as a value for input element. This method is valid if only the type of the input element is “datetime-local”
setDateValue(DateTime)This method is used to set DateTime object as a value for input element. This method is valid if only the type of the input element is “date”
setEmailValue(String)This method is used to set email String as a value for input element. This method is valid if only the type of the input element is “email”
setMonthValue(DateTime)This method is used to set DateTime object as a value for input element. This method is valid if only the type of the input element is “month”
setNumberValue(float)This method is used to set number as a value for input element. This method is valid if only the type of the input element is “number”
setPasswordValue(String)This method is used to set password String as a value for input element. This method is valid if only the type of the input element is “password”
setRadioValue(bool)Sets the checkedness state for the input element with the radio type.
setTimeValue(TimeSpan)This method is used to set TimeSpan object as a value for input element. This method is valid if only the type of the input element is “time”
setUrlValue(Url)This method is used to set Url object as a value for input element. This method is valid if only the type of the input element is “url”
setWeekValue(String)This method is used to set ‘week’ String as a value for input element. This method is valid if only the type of the input element is “week”

See Also