diff --git a/docs/general-concepts/forms-fields/_generic-attributes.md b/docs/general-concepts/forms-fields/_generic-attributes.md new file mode 100644 index 00000000..4e89599c --- /dev/null +++ b/docs/general-concepts/forms-fields/_generic-attributes.md @@ -0,0 +1,16 @@ + + +## Gernic Attributes +These attributes include, for example: +- **onchange** - in which you can pass a javascript function which should get control when the input element is changed +- **autofocus** - to specify the input element which should receive focus on page load +- **data-xxx** - data attributes to be set on the input element + + +## Attributes +As all form fields inherit from the base class `FormField`, the options listed below are **optional** and available to all form fields in addition to the field specific options: +- **autocomplete** (default: on) If 'off' element will not be automatically autocompleted by the Browser. +- **spellcheck** (default: true) The spellcheck state for the form field. +- **autofocus** (default: false) The autofocus request for the form field. If true element will be automatically focused on document load. +- **hidden** (default: false) A field can be hidden temporary or as feature toggle by setting this option to true. +- **hiddenLabel** (default: false) If this value is defined as `true`, no label is rendered for the corresponding form field. diff --git a/docs/general-concepts/forms-fields/standard-fields/accessiblemedia.md b/docs/general-concepts/forms-fields/standard-fields/accessiblemedia.md index 044b0eb9..4810c15b 100644 --- a/docs/general-concepts/forms-fields/standard-fields/accessiblemedia.md +++ b/docs/general-concepts/forms-fields/standard-fields/accessiblemedia.md @@ -2,6 +2,7 @@ sidebar_position: 2 title: Accessiblemedia Form Field --- +import Attributes from '../_generic-attributes.md' Accessiblemedia Form Field ========================== @@ -19,6 +20,8 @@ The **accessiblemedia** form field type provides modal access to the media manag Implemented by: libraries/src/Form/Field/AccessiblemediaField.php + + ## Example XML parameter definition ```xml diff --git a/docs/general-concepts/forms-fields/standard-form-field-attributes.md b/docs/general-concepts/forms-fields/standard-form-field-attributes.md index 4e6d5496..eed65137 100644 --- a/docs/general-concepts/forms-fields/standard-form-field-attributes.md +++ b/docs/general-concepts/forms-fields/standard-form-field-attributes.md @@ -2,6 +2,7 @@ sidebar_position: 2 title: Standard Form Field Attributes --- +import Attributes from './_generic-attributes.md' Standard Form Field Attributes ============================== @@ -11,10 +12,7 @@ Many of the attributes of the standard form map directly to HTML field attribute You can view the available list of general attributes by looking at libraries/src/Form/FormField.php, in the `__set` function. As many of these can be used across the range of Joomla standard form fields, they're often not explicitly cited in the form field detailed description. -These attributes include, for example: -- **onchange** - in which you can pass a javascript function which should get control when the input element is changed -- **autofocus** - to specify the input element which should receive focus on page load -- **data-xxx** - data attributes to be set on the input element + ## class