.. appdev-form-objects
.. _appdevformobjects:
11. Formfield Objects
=====================
* :ref:`objecttype-formfieldlist`
* :ref:`objecttype-formfieldtext`
* :ref:`objecttype-formfieldlabel`
* :ref:`objecttype-formfieldtextarea`
* :ref:`objecttype-formfieldpulldown`
* :ref:`objecttype-formfielddynpulldown`
* :ref:`objecttype-formfieldcheckbox`
* :ref:`objecttype-formfieldhidden`
.. _objecttype-formfieldlist:
11.1. FormfieldList
-------------------
The ``FormfieldList`` *x0-object-type* serves as both a *x0-form* management tool
and a *x0-object-container*.
It offers advanced *x0-form-validation* capabilities and can be referenced by multiple
*x0-control-flow-modifying* *x0-object-types*.
More info at :ref:`appdevforms`.
11.1.1. Object Attributes
*************************
+---------------------+----------------------+-------------------------------------------------+
| **Property** | **Type** | **Description** |
+=====================+======================+=================================================+
| HiddenFields | Array | Array of Formfield IDs |
+---------------------+----------------------+-------------------------------------------------+
| Sections | Array of Elements | Array of Section Objects / Section Properties |
+---------------------+----------------------+-------------------------------------------------+
11.1.2. Section Attributes
**************************
+---------------------+----------------------+-------------------------------------------------+
| **Property** | **Type** | **Description** |
+=====================+======================+=================================================+
| ID | String | Section Identifier |
+---------------------+----------------------+-------------------------------------------------+
| Object | String | Header to x0-object (existing) Reference |
+---------------------+----------------------+-------------------------------------------------+
| ObjectAttributes | Object | Header Properties |
+---------------------+----------------------+-------------------------------------------------+
| Formfields | Array | Array of Formfield IDs |
+---------------------+----------------------+-------------------------------------------------+
11.1.3. Section Object Attributes
*********************************
+---------------------+---------------+--------------------------------------------------------+
| **Property** | **Type** | **Description** |
+=====================+===============+========================================================+
| Style | CSS-String | CSS Style Classes, space separated |
+---------------------+---------------+--------------------------------------------------------+
| SubStyle | CSS-String | CSS Style Classes, space separated |
+---------------------+---------------+--------------------------------------------------------+
| HeaderIcon | CSS-String | Fontawesome Icon CSS for Prepend Icon |
+---------------------+---------------+--------------------------------------------------------+
| HeaderTextID | TextID-String | TextID referenced in "webui.text" DB Table / Multilang |
+---------------------+---------------+--------------------------------------------------------+
| SubHeaderTextID | TextID-String | TextID referenced in "webui.text" DB Table / Multilang |
+---------------------+---------------+--------------------------------------------------------+
11.1.4. Grid Attributes
***********************
Global Grid Attributes can be applied, see :ref:`appdevgridsystem`.
11.1.5. Runnable Example
************************
* http://x0-app.x0.localnet/python/Index.py?appid=example5
.. _objecttype-formfieldtext:
11.2. FormfieldText
-------------------
The ``FormfieldText`` *x0-object-type* renders an HTML ```` element of type ``text``.
11.2.1. Object Attributes
*************************
.. table:: Object Type FormfieldText Attributes
:widths: 30 20 80
+---------------------+----------------------+-------------------------------------------------+
| **Property** | **Type** | **Description** |
+=====================+======================+=================================================+
| Type | Constant String | Fixed String 'text' |
+---------------------+----------------------+-------------------------------------------------+
| Style | CSS-String | CSS Style Classes, space separated |
+---------------------+----------------------+-------------------------------------------------+
| StyleValidateOk | CSS-String | CSS Style Classes Override, space separated |
+---------------------+----------------------+-------------------------------------------------+
| StyleValidateFail | CSS-String | CSS Style Classes Override, space separated |
+---------------------+----------------------+-------------------------------------------------+
| TextID | TextID-String | TextID referenced in "webui.text" DB Table |
+---------------------+----------------------+-------------------------------------------------+
| Placeholder | String | Placeholder |
+---------------------+----------------------+-------------------------------------------------+
| MaxLength | Integer | Maximum Length Character Count |
+---------------------+----------------------+-------------------------------------------------+
| Number | Boolean | Container Div Type, |
+---------------------+----------------------+-------------------------------------------------+
| Disabled | Boolean | Set HTML Form "disabled" Property |
+---------------------+----------------------+-------------------------------------------------+
| ReadOnly | Boolean | Set HTML Form "readonly" Property |
+---------------------+----------------------+-------------------------------------------------+
| Min | Integer | Minimum Number Value |
+---------------------+----------------------+-------------------------------------------------+
| Max | Integer | Maximum Number Value |
+---------------------+----------------------+-------------------------------------------------+
11.2.2. FormfieldList Related
*****************************
.. table:: Object Type FormfieldText FormfieldList Related Attributes
:widths: 30 20 80
+---------------------+----------------------+-------------------------------------------------+
| **Property** | **Type** | **Description** |
+=====================+======================+=================================================+
| DBColumn | String | Database Column Reference |
+---------------------+----------------------+-------------------------------------------------+
.. _objecttype-formfieldlabel:
11.3. FormfieldLabel
--------------------
The ``FormfieldLabel`` *x0-object-type* renders an HTML ``