<dd><spanclass="apidef">uri</span><spanclass="apidesc">URI of this custom Web Page.</span></dd>
<dd><spanclass="apidef">title</span><spanclass="apidesc">Page title of this custom Web page. It will appear on the auto connection menu and at the top of that page.</span></dd>
<dd><spanclass="apidef">menu</span><spanclass="apidesc">Specifies whether to display this page on menu.</span></dd>
<dd><spanclass="apidef">addons</span><spanclass="apidesc">Reference to AutoConnectElement collection.</span></dt>
Returns a reference to the element specified by **name**. An operator `[]` is a shortcut for [getElement](apiaux.md#getelement) function with the reference casting. Unlike getElement, which returns a pointer to that element, an operator `[]` returns a reference to that element. You also need to cast the return value to the actual type, just like the getElement function.
<dlclass="apidl">
<dt>**Parameters**</dt>
<dd><spanclass="apidef">name</span><spanclass="apidesc">Name of the AutoConnectElements to be retrieved.</span></dd>
<dt>**Return value**</dt><dd>A reference to AutoConnectElement. It is different from the actual element type.</dd>
<dd><spanclass="apidef">addon</span><spanclass="apidesc">Reference of AutoConnectElements. Specifies one of the AutoConnectElements classes.</span></dd>
<dd><spanclass="apidef">addons</span><spanclass="apidesc">An array list of reference of AutoConnectElements. An [list initialization](https://en.cppreference.com/w/cpp/language/list_initialization) of the [std::vector](https://en.cppreference.com/w/cpp/container/vector) can be used for the addons parameter cause the actual definition of type **AutoConnectElementVT** is `std::vector<std::reference_wrapper<AutoConnectElement>>`.</span></dd>
Get a registered AutoConnectElement as specified name. If **T** is specified as an actual type of AutoConnectElements, it returns a reference to that instance.
<dd><spanclass="apidef">T</span><spanclass="apidesc">Actual type name of AutoConnectElements as [AutoConnectButton](apielements.md#autoconnectbutton), [AutoConnectCheckbox](apielements.md#autoconnectcheckbox), [AutoConnectElement](apielements.md#autoconnectelement), [AutoConnectFile](apielements.md#autoconnectfile), [AutoConnectInput](apielements.md#autoconnectinput), [AutoConnectRadio](apielements.md#autoconnectradio), [AutoConnectSelect](apielements.md#autoconnectselect), [AutoConnectSubmit](apielements.md#autoconnectsubmit), [AutoConnectText](apielements.md#autoconnecttext).</span></dd>
<dd>A reference to std::vector of reference to AutoConnecctElements.</dd>
</dl>
The getElements returns a reference to std::vector of reference to AutoConnecctElements. This function is provided to handle AutoConnectElemets owned by AutoConnectAux in bulk, and you can use each method of std::vector for a return value.
```cpp
// An example of getting type and name of all AutoConnectElements registered in AutoConnectAux.
AutoConnectAux aux;
// some code here...
AutoConnectElementVt& elements = aux.getElements();
for (AutoConnectElement& elm : elements) {
Serial.printf("name<%s> as type %d\n", elm.name.c_str(), (int)elm.typeOf());
Load all AutoConnectElements elements from JSON document into AutoConnectAux as custom Web pages. The JSON document specified by the load function must be the [document structure](acjson.md#json-objects-elements-for-the-custom-web-page) of AutoConnectAux. Its JSON document can describe multiple pages as an array.
<dlclass="apidl">
<dt>**Parameters**</dt>
<dd><spanclass="apidef">in</span><spanclass="apidesc">Specifies the JSON document to be load. The load function can input the following objects.
- String : Read-only String
- PROGMEM : Character array contained in the flash
- Stream : An entity that inherits stream class, generally SPIFFS or SD.
</span></dd>
<dt>**Return value**</dt>
<dd><spanclass="apidef">true</span><spanclass="apidesc">JSON document as the custom Web pages successfully loaded.</span></dd>
!!! hint "Load multiple custom Web pages separately"
Multiple custom Web pages can be loaded at once with JSON as an array. But it will consume a lot of memory. By loading a JSON document by page as much as possible, you can reduce memory consumption.
Load specified element from JSON document into AutoConnectAux. The JSON document specified by the loadElement function must be the [AutoConnectElement document structure](acjson.md#json-object-for-autoconnectelements). When loading from a JSON document that describes multiple elements, its description must be an array syntax.
<dlclass="apidl">
<dt>**Parameters**</dt>
<dd><spanclass="apidef">in</span><spanclass="apidesc">Specifies the JSON document to be load. The load function can input the following objects.
- String : Read-only String
- PROGMEM : Character array contained in the flash
- Stream : An entity that inherits stream class, generally SPIFFS or SD.
</span></dd>
<dd><spanclass="apidef">name</span><spanclass="apidesc">Specifies the name to be load. If the name is not specified, the loadElement function will load all elements contained in the JSON document.</span></dd>
Please note that the JSON document that is the input for loadElement is an array syntax of AutoConnectElements when there are multiple elements. For example, the following JSON document has a syntax error:
Set or reset the display as menu item for this AutoConnectAux. This function programmatically manipulates the menu parameter of the [AutoConenctAux constructor](apiaux.md#autoconnectaux).
<dlclass="apidl">
<dt>**Parameters**</dt>
<dd><spanclass="apidef">true</span><spanclass="apidesc">Show on the menu.</span></dd>
<dd><spanclass="apidef">false</span><spanclass="apidesc">Hidden on the menu.</span></dd>
<dd><spanclass="apidef">handler</span><spanclass="apidesc">A function that behaves when a request to the AutoConnectAux page occurs. AuxHandlerFunctionT type is defined by the following declaration.<pclass="apidesc">`String handler(AutoConnectAux&, PageArgument&)`</p></span></dd>
<dd><spanclass="apidef">order</span><spanclass="apidesc">Specifies when the handler is called with the following enumeration value.</span>
Called before AutoConnect generates the HTML of the page. You set the value of AutoConnectElements in the handler then its value will be displayed on the page.
: - **AC_EXIT_LATER** :
Called after AutoConnect generates the HTML of the page. You can append to HTML generated by AutoConnect.
Register the upload handler of the AutoConnectAux.
<dlclass="apidl">
<dt>**Parameters**</dt>
<dd><spanclass="apidef">uploadFunc</span><spanclass="apidesc">A function that behaves when request to upload with the AutoConnectAux page. UploadFuncT type is defined by the following declaration.<pclass="apidesc">`void(const String&, const HTTPUpload&)`</p></span></dd>
Release a specified AutoConnectElement from AutoConenctAux. The release function is provided to dynamically change the structure of the custom Web pages with the sketch. By combining the release function and the [add](apiaux.md#add) function or the [loadElement](apiaux.md#loadelement) function, the sketch can change the style of the custom Web page according to its behavior.
<dlclass="apidl">
<dt>**Parameters**</dt>
<dd><spanclass="apidef">name</span><spanclass="apidesc">Specifies the name of AutoConnectElements to be released.</span></dd>
Write elements of AutoConnectAux to the stream. The saveElement function outputs the specified AutoConenctElements as a JSON document using the [prettyPrintTo](https://arduinojson.org/v5/api/jsonobject/prettyprintto/) function of the [ArduinoJson](https://arduinojson.org/) library.
<dlclass="apidl">
<dt>**Parameters**</dt>
<dd><spanclass="apidef">out</span><spanclass="apidesc">Output stream to be output. SPIFFS, SD also Serial can be specified generally.</span></dd>
<dd><spanclass="apidef">names</span><spanclass="apidesc">The array of the name of AutoConnectElements to be output. If the names parameter is not specified, all AutoConnectElements registered in AutoConnectAux are output.</span></dd>
<dt>**Return value**</dt>
<dd>The number of bytes written.</dd>
</dl>
!!! note "The output format is pretty"
The saveElement function outputs a prettified JSON document.
Sets the value of the specified AutoConnectElement. If values is specified as a *std::vector* of String, the element that can set the values is the [AutoConnectRadio](apielements.md#autoconnectradio) or the [AutoConnectSelect](apielements.md#autoconnectselect).
<dlclass="apidl">
<dt>**Parameters**</dt>
<dd><spanclass="apidef">name</span><spanclass="apidesc">Specifies the name of the AutoConnectElements that you want to set the value.</span></dd>
<dd><spanclass="apidef">value</span><spanclass="apidesc">Specifies the value to be set.</span></dd>
<dd><spanclass="apidef">values</span><spanclass="apidesc">Specifies a reference of a *std::vector* of String. It contains the values of the AutoConnectRadio or the AutoConnectSelect.</span></dd>
<dt>**Return value**</dt>
<dd><spanclass="apidef">true</span><spanclass="apidesc">The value has been set.</span></dd>
<dd><spanclass="apidef">false</span><spanclass="apidesc">AutoConnectElements with the specified name are not registered. Or the type of the value is not consistent with the specified AutoConnectElements.</span></dd>
</dl>
!!! hint "You can directly access the value member variable."
If you are gripping with the sketch to the AutoConnectElements of the target that sets the value, you can access the value member variable directly. The following sketch code has the same effect.
```cpp
AutoConnectAux aux;
// ... Griping the AutoConnectText here.
aux.setElementValue("TEXT_FIELD", "New value");
```
```cpp
AutoConnectAux aux;
// ... Griping the AutoConnectText here.
AutoConnectText& text = aux.getElement<AutoConnectText>("TEXT_FIELD");
text.value = "New value";
```
The difference between the setElementValue and the value access with the [getElement](apiaux.md#getelement) is the certainty of the registration state for the element. The [getElement](apiaux.md#getelement) returns an empty object if the element is not registered then a sketch assigns the value to it. May occur unexpected results and crashes. You should use the setElementValue if its registration is unsettled.
Set the title string of the custom Web page. This title will be displayed as the menu title of the custom Web page.
<dlclass="apidl">
<dt>**Parameter**</dt>
<dd><spanclass="apidef">title</span><spanclass="apidesc">Title string to be display.</span></dd>
</dl>
!!! caution "Not the menu title"
The setTitle function is not set for the AutoConnect menu title. The effect of this function is that custom Web page only. To change the AutoConnect menu title use [AutoConnectConfig::title](apiconfig.md#title).