## AutoConnectButton
### Constructor
```cpp
AutoConnectButton(const char* name = "", const char* value = "", const String& action = String())
```
**Parameters**
name The element name.
value Value of the element.
action Native code of the action script executed when the button is clicked.
### Public member variables
#### name
The element name.
**Type**
String
#### value
Value of the element.
**Type**
String
#### action
HTML native code of the action script to be executed when the button is clicked. It is mostly used with a JavaScript to activate a script.[^1]
**Type**
String
[^1]:JavaScript can be inserted into a custom Web page using AutoConnectElement.
### Public member functions
#### typeOf
```cpp
ACElement_t typeOf(void)
```
Returns type of AutoConnectElement.
**Return value**
AC_Button
## AutoConnectCheckbox
### Constructor
```cpp
explicit AutoConnectCheckboxBasis(const char* name = "", const char* value = "", const char* label = "", const bool checked = false)
```
**Parameters**
name The element name.
value Value of the element.
label A label string prefixed to the checkbox.
check Checked state of the checkbox.
### Public member variables
#### name
The element name.
**Type**
String
#### value
Value of the element. It becomes a value attribute of an HTML `#!html ` tag.
**Type**
String
#### label
A label is an optional string. A label is always arranged on the right side of the checkbox. Specification of a label will generate an HTML `#!html ` tag with an `id` attribute. The checkbox and the label are connected by the id attribute.
**Type**
String
#### checked
It indicates the checked status of the checkbox. The value of the checked checkbox element is packed in the query string and sent by submit.
**Type**
Boolean
### Public member functions
#### typeOf
```cpp
ACElement_t typeOf(void)
```
Returns type of AutoConnectElement.
**Return value**
AC_Checkbox
## AutoConnectElement
### Constructor
```cpp
AutoConnectElement(const char* name = "", const char* value = "")
```
**Parameters**
name The element name.
value Value of the element.
### Public member variables
#### name
The element name.
**Type**
String
#### value
Value of the element. It is output as HTML as it is as a source for generating HTML code.
**Type**
String
### Public member functions
#### typeOf
```cpp
ACElement_t typeOf(void)
```
Returns type of AutoConnectElement.
**Return value**
AC_Element
#### as
```cpp
AutoConnectElement& as(void)
```
Casts the reference to the AutoConnectElement the specified type.
**Parameters**
T The element type. AutoConnectElements type such as [AutoConnectButton](apielements.md#autoconnectbutton), [AutoConnectCheckbox](apielements.md#autoconnectcheckbox), [AutoConnectFile](apielements.md#autoconnectfile), [AutoConnectInput](apielements.md#autoconnectinput), [AutoConnectRadio](apielements.md#autoconnectradio), [AutoConnectSelect](apielements.md#autoconnectselect), [AutoConnectSubmit](apielements.md#autoconnectsubmit), [AutoConnectText](apielements.md#autoconnecttext).
**Return value**
A reference to the AutoConnectElement with actual type.
## AutoConnectFile
### Constructor
```cpp
AutoConnectFile(const char* name = "", const char* value = "", const char* label = "", const ACFile_t store = AC_File_FS)
```
**Parameters**
name The element name.
value File name to be upload.
label Label string.
store The **ACFile_t** enumerator that represents the media to save the uploaded file.
### Public member variables
#### name
The element name.
**Type**
String
#### value
File name to be upload. This attribute is read only.
**Type**
String
#### label
A label is an optional string. A label is always arranged on the left side of the file input box. Specification of a label will generate an HTML `#!html ` tag with an id attribute. The file input box and the label are connected by the id attribute.
**Type**
String
#### store
Specifies the save destination of the uploaded file. You can use the built-in uploader to save uploaded file to the flash of the ESP8266/ESP32 module or external SD media without writing a dedicated sketch code. It also supports saving to any destination using a custom uploader that inherits from the AutoConnectUploadHandler class.
**Type**
ACFile_t
- **`AC_File_FS`** : Save the uploaded file to SPIFFS in the flash.
- **`AC_File_SD`** : Save the uploaded file to SD.
- **`AC_File_Ext`** : Save the file using your own upload handler.
#### mimeType
The mime type of the upload file which included as Media type in the http post request. Set by the client (usually the browser) that requested the upload. It is determined by the file type as `application/octet-stream`, `text` etc. which is described in [IANA Media Type](https://www.iana.org/assignments/media-types/media-types.xhtml).
**Type**
String
#### size
Size of the uploading file.
**Type**
size_t
### Public member functions
#### typeOf
```cpp
ACElement_t typeOf(void)
```
Returns type of AutoConnectFile.
**Return value**
AC_File
## AutoConnectInput
### Constructor
```cpp
AutoConnectInput(const char* name = "", const char* value = "", const char* label = "", const char* pattern = "", const char* placeholder = "")
```
**Parameters**
name The element name.
value Value of the element.
label Label string.
pattern Regular expression string for checking data format.
placeholder A placeholder string.
### Public member variables
#### name
The element name.
**Type**
String
#### value
Value of the element. It becomes a value attribute of an HTML `#!html ` tag. An entered text in the custom Web page will be sent with a query string of the form. The value set before accessing the page is displayed as the initial value.
**Type**
String
#### label
A label is an optional string. A label is always arranged on the left side of the input box. Specification of a label will generate an HTML `#!html ` tag with an id attribute. The input box and the label are connected by the id attribute.
**Type**
String
#### pattern
A pattern specifies a regular expression that the input-box's value is checked against on form submission.
**Type**
String
#### placeholder
A placeholder is an option string. Specification of a placeholder will generate a `placeholder` attribute for the input tag.
**Type**
String
### Public member functions
#### typeOf
```cpp
ACElement_t typeOf(void)
```
Returns type of AutoConnectElement.
**Return value**
AC_Input
#### isValid
```cpp
bool isValid(void)
```
Evaluate the pattern as a regexp and return whether value matches. Always return true if the pattern is undefined.
**Return value**
true The value matches a pattern.
false The value does not match a pattern.
## AutoConnectRadio
### Constructor
```cpp
AutoConnectRadio(const char* name = "", std::vector const& values = {}, const char* label = "", const ACArrange_t order = AC_Vertical, const uint8_t checked = 0)
```
**Parameters**
name The element name.
values An array of values of the radio buttons. Specifies an [std::vector](https://en.cppreference.com/w/cpp/container/vector) object.
label Label string.
order The direction to arrange the radio buttons.
checked An index to be checked in the radio buttons.
### Public member variables
#### name
The element name.
**Type**
String
#### values
An array of String type for the radio button options. It is an initialization list can be used. The `#!html ` tags will be generated from each entry in the values.
**Type**
std::vector<String>
#### label
A label is an optional string. A label will be arranged in the left or top of the radio buttons according to the [order](#order).
**Type**
String
#### order
Specifies the direction to arrange the radio buttons. A label will place in the left or the top according to the **_order_**. It is a value of **ACArrange_t** type and accepts one of the following:
**Type**
ACArrange_t
- **`AC_Horizontal`** : Horizontal arrangement.
- **`AC_Vertical`** : Vertical arrangement.
#### checked
Specifies the index number (1-based) of the **values** to be checked. If this parameter is not specified neither item is checked.
**Type**
uint8_t
### Public member functions
#### typeOf
```cpp
ACElement_t typeOf(void)
```
Returns type of AutoConnectElement.
**Return value**
AC_Radio
#### add
```cpp
void add(const String& value)
```
Adds an option for the radio button.
**Parameters**
value An option string to add to the radio button.
#### check
```cpp
void check(const String& value)
```
Indicates the check of the specified option for the radio buttons. You can use the **check** function for checking dynamically with arbitrary of the radio button.
**Parameters**
value An option string to be checked.
#### empty
```cpp
void empty(const size_t reserve = 0)
```
Clear the array of option strings that AutoConnectRadio has in the values. When a **_reserve_** parameter is specified, a vector container of that size is reserved.
**Parameters**
reserve Reserved size of a container for the radio button option strings.
#### operator [ ]
```cpp
const String& operator[] (const std::size_t n)
```
Returns a value string of the index specified by **_n_**.
**Parameters**
n Index of values array to return. Its base number is 0.
**Return value**
A reference of a value string indexed by the specified the **n**.
#### size
```cpp
size_t size(void)
```
Returns number of options which contained.
**Return value**
Number of options which contained.
#### value
```cpp
const String& value(void) const
```
Returns current checked option of the radio buttons.
**Return value**
A String of an option current checked. If there is no checked option, a null string returned.
## AutoConnectSelect
### Constructor
```cpp
AutoConnectSelect(const char* name = "", std::vector const& options = {}, const char* label = "")
```
**Parameters**
name The element name.
options An array of options of the select element. Specifies an [std::vector](https://en.cppreference.com/w/cpp/container/vector) object.
label Label string.
### Public member variables
#### name
The element name.
**Type**
String
#### options
An array of String type for the selection options. It is an initialization list can be used. The `#!html ` tags will be generated from each entry in the options.
**Type**
std::vector<String>
#### label
A label is an optional string. A label will be arranged in the top of the selection list.
**Type**
String
### Public member functions
#### typeOf
```cpp
ACElement_t typeOf(void)
```
Returns type of AutoConnectElement.
**Return value**
AC_Select
#### add
```cpp
void add(const String& option)
```
Adds a selectable option string for the selection list.
**Parameters**
option A string of selectable item to be contained in the select element.
#### empty
```cpp
void empty(const size_t reserve = 0)
```
Clear the array of options list that AutoConnectSelect has in the options. When a **_reserve_** parameter is specified, a vector container of that size is reserved.
**Parameters**
reserve Reserved size of a container for the options.
#### operator [ ]
```cpp
const String& operator[] (const std::size_t n)
```
Returns an option string of the index specified by **_n_**.
**Parameters**
n Index of options array to return. Its base number is 0.
**Return value**
A reference of a option string indexed by the specified the **n**.
#### size
```cpp
size_t size(void)
```
Returns number of options which contained.
**Return value**
Number of options which contained.
## AutoConnectSubmit
### Constructor
```cpp
AutoConnectSubmit(const char* name = "", const char* value ="", char* uri = "")
```
**Parameters**
name The element name.
value The name of the submit button as an HTML `#!html ` tag, it will also be the label of the button.
uri Destination URI.
### Public member variables
#### name
The element name.
**Type**
String
#### value
The name of the submit button. It will also be the label of the button.
**Type**
String
#### uri
Destination URI.
**Type**
String
### Public member functions
#### typeOf
```cpp
ACElement_t typeOf(void)
```
Returns type of AutoConnectElement.
**Return value**
AC_Submit
## AutoConnectText
### Constructor
```cpp
AutoConnectText(const char* name = "", const char* value = "", const char* style = "")
```
**Parameters**
name The element name.
value String of content for the text element.
style A style code with CSS format that qualifiers the text.
### Public member variables
#### name
The element name.
**Type**
String
#### value
A content string of the text element.
**Type**
String
#### style
A style code with CSS format that qualifiers the text.
**Type**
String
### Public member functions
#### typeOf
```cpp
ACElement_t typeOf(void)
```
Returns type of AutoConnectElement.
**Return value**
AC_Text