From bdbb69feb8daa32a544c2a9391a0c10cd13d40ec Mon Sep 17 00:00:00 2001 From: Proximate Date: Fri, 27 Dec 2024 20:08:47 +0100 Subject: [PATCH 1/3] Standard Fields index Added a section that lists optional options for all field types --- .../forms-fields/standard-fields/index.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/docs/general-concepts/forms-fields/standard-fields/index.md b/docs/general-concepts/forms-fields/standard-fields/index.md index 375f2d39..ef7868e7 100644 --- a/docs/general-concepts/forms-fields/standard-fields/index.md +++ b/docs/general-concepts/forms-fields/standard-fields/index.md @@ -11,6 +11,23 @@ Joomla provides an extensive range of type of fields which you can use in your f To try out a standard form field you can download the `com_exampleform` component from [Exampleform component](https://github.com/joomla/manual-examples/tree/main/component-exampleform), and edit the /site/forms/example_form.xml to include the field you want to investigate. +## Options available along all Form Field Types +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 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. +- **hiddenDescription** (default: false) Should the description be hidden when rendering the form field? This may be useful if you have the description rendering in your form field itself for e.g. note fields. +- **translateLabel** (default: true) Define if the Label should be translated. +- **translateDescription** (default: true) Define if the Description should be translated. +- **translateHint** (default: true) Define if the Hint text should be translated. +- **disabled** (default: false) If true then the field will be disabled and user can't interact with the field. +- **readonly** (default: false) If true then the field will be readonly. +- **~~validate~~** Should not longer been used See [Form Client-Side Validation](/docs/general-concepts/forms/client-side-validation.md) instead +- **pattern** The pattern (Reg Ex) of value of the form field +- **class** Whitespace separated list of classnames which will be added to the input element (e.g. "my-custom-class another-custom-class") + ## List of Standard Form Fields The following is a full list of all supplied form fields available in this release. From 84a117573aaa0f5353d2aa365c00fd5e4f4e19ea Mon Sep 17 00:00:00 2001 From: Proximate Date: Fri, 27 Dec 2024 20:11:26 +0100 Subject: [PATCH 2/3] Update index.md --- docs/general-concepts/forms-fields/standard-fields/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/general-concepts/forms-fields/standard-fields/index.md b/docs/general-concepts/forms-fields/standard-fields/index.md index ef7868e7..c12fadb3 100644 --- a/docs/general-concepts/forms-fields/standard-fields/index.md +++ b/docs/general-concepts/forms-fields/standard-fields/index.md @@ -13,7 +13,7 @@ To try out a standard form field you can download the `com_exampleform` componen ## Options available along all Form Field Types 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 by the Browser. +- **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. From e79b72337cbe19384d480d6294dd1c38e13243f0 Mon Sep 17 00:00:00 2001 From: Proximate Date: Sat, 28 Dec 2024 14:49:33 +0100 Subject: [PATCH 3/3] Update index.md and added Data Attribute as option Added data- Attribute as option including information where it will be added and an example. --- docs/general-concepts/forms-fields/standard-fields/index.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/general-concepts/forms-fields/standard-fields/index.md b/docs/general-concepts/forms-fields/standard-fields/index.md index c12fadb3..a6436311 100644 --- a/docs/general-concepts/forms-fields/standard-fields/index.md +++ b/docs/general-concepts/forms-fields/standard-fields/index.md @@ -27,6 +27,7 @@ As all form fields inherit from the base class `FormField`, the options listed b - **~~validate~~** Should not longer been used See [Form Client-Side Validation](/docs/general-concepts/forms/client-side-validation.md) instead - **pattern** The pattern (Reg Ex) of value of the form field - **class** Whitespace separated list of classnames which will be added to the input element (e.g. "my-custom-class another-custom-class") +- **data-** Data Attributes for Form Field elements will be added to the fieldset element (usage: data-foo="key:value" or data-bar="someValue") ## List of Standard Form Fields The following is a full list of all supplied form fields available in this release.