diff --git a/docs/_tips/form-attributes.md b/docs/_tips/form-attributes.md new file mode 100644 index 00000000..c71543eb --- /dev/null +++ b/docs/_tips/form-attributes.md @@ -0,0 +1 @@ +TIP: Valid HTML Form attributes (as listed in the [config file](config/config-files.md#html-form-attributes)), `data-` and `aria-` attributes passed through ExpressionEngine tag parameters in the template will be included into generated opening form tag. \ No newline at end of file diff --git a/docs/add-ons/consent.md b/docs/add-ons/consent.md index 1f46cd00..3ba9e104 100755 --- a/docs/add-ons/consent.md +++ b/docs/add-ons/consent.md @@ -40,6 +40,8 @@ Consent Forms allow the visitor to grant or withdraw consent to one or more Cons [TOC=3] +{{embed:_tips/form-attributes.md}} + #### `consent=` consent='ee:cookies_functionality' diff --git a/docs/add-ons/email.md b/docs/add-ons/email.md index 16e8b1c1..3afec336 100755 --- a/docs/add-ons/email.md +++ b/docs/add-ons/email.md @@ -56,6 +56,8 @@ The contact form is created similar to a standard web form, only you **do not** [TOC=3] +{{embed:_tips/form-attributes.md}} + ### `charset=` charset="utf-8" diff --git a/docs/add-ons/search/advanced.md b/docs/add-ons/search/advanced.md index 652ee127..76207ca6 100755 --- a/docs/add-ons/search/advanced.md +++ b/docs/add-ons/search/advanced.md @@ -143,6 +143,8 @@ The search results are displayed on the page you specify as the [result_page=](# [TOC=3] +{{embed:_tips/form-attributes.md}} + ### `category=` category="1" diff --git a/docs/add-ons/search/simple.md b/docs/add-ons/search/simple.md index fc79b871..664183b6 100755 --- a/docs/add-ons/search/simple.md +++ b/docs/add-ons/search/simple.md @@ -73,6 +73,8 @@ Besides specifying whether future entries are included in the search using the [ ## Parameters +{{embed:_tips/form-attributes.md}} + ### `name=` name="search_form" diff --git a/docs/channels/channel-form/overview.md b/docs/channels/channel-form/overview.md index 8e7826f2..4a866b93 100755 --- a/docs/channels/channel-form/overview.md +++ b/docs/channels/channel-form/overview.md @@ -61,6 +61,8 @@ By default, validation errors will be displayed using the User Message Template. [TOC=3 hide] +{{embed:_tips/form-attributes.md}} + The Following parameters are available for the `{exp:channel:form}`: ### `allow_comments=` diff --git a/docs/comment/form.md b/docs/comment/form.md index e3c0650d..5fe92dd4 100755 --- a/docs/comment/form.md +++ b/docs/comment/form.md @@ -52,6 +52,8 @@ TIP: **Tip:** Notice the variables in the "value" form fields? These allow us to [TOC=4] +{{embed:_tips/form-attributes.md}} + #### `entry_id=` entry_id="24" diff --git a/docs/config/config-files.md b/docs/config/config-files.md index f2454ca9..1e656813 100644 --- a/docs/config/config-files.md +++ b/docs/config/config-files.md @@ -29,6 +29,12 @@ The list of the words that are being used to generate [CAPTCHA](security/captcha This file contains an array of foreign characters for transliteration conversion used by the Text helper (example would be generating URL Titles for entries). +#### HTML Form Attributes + +`valid_form_attributes.php` + +A list of HTML attributes that are allowed to be passed via EE template tag parameters to the `form` tag when creating forms with `ee()->functions->form_declaration()`. Additionally, attributes prefixed with `data-` and `aria-` can be used. + #### Allowed Mime Types `mimes.php` diff --git a/docs/development/legacy/libraries/functions.md b/docs/development/legacy/libraries/functions.md index 79f17753..bcc9b782 100755 --- a/docs/development/legacy/libraries/functions.md +++ b/docs/development/legacy/libraries/functions.md @@ -126,6 +126,8 @@ Any form will accept the `form_class` and `form_id` parameters. Access the value $r = ee()->functions->form_declaration($form_details); +{{embed:_tips/form-attributes.md}} + ### `form_backtrack([$offset = ''])` | Parameter | Type | Description | diff --git a/docs/member/edit-avatar.md b/docs/member/edit-avatar.md index 0d75ac56..77845ef7 100644 --- a/docs/member/edit-avatar.md +++ b/docs/member/edit-avatar.md @@ -20,6 +20,8 @@ This tag allows users to edit their avatar image. The image will be uploaded to ## Parameters +{{embed:_tips/form-attributes.md}} + ### `return=` return="member/profile" diff --git a/docs/member/edit-profile.md b/docs/member/edit-profile.md index 5b5f5782..064e66dd 100644 --- a/docs/member/edit-profile.md +++ b/docs/member/edit-profile.md @@ -17,6 +17,8 @@ Edit member profile. ## Parameters +{{embed:_tips/form-attributes.md}} + ### `datepicker=` Include the datepicker javascript. This should be set to ``yes`` if there is a date type member custom field in order to output the calendar. diff --git a/docs/member/login.md b/docs/member/login.md index ce33d2cd..7d7023a7 100644 --- a/docs/member/login.md +++ b/docs/member/login.md @@ -28,6 +28,8 @@ Output a login form. ## Parameters +{{embed:_tips/form-attributes.md}} + ### `action=` action="https://example.com/" diff --git a/docs/member/logout.md b/docs/member/logout.md index 1b9b8b20..af8ce4de 100644 --- a/docs/member/logout.md +++ b/docs/member/logout.md @@ -33,6 +33,8 @@ Output a log out form. ## Parameters +{{embed:_tips/form-attributes.md}} + ### `action=` action="https://example.com/" @@ -65,5 +67,3 @@ This parameter allows you to define where the user will be returned after succes 1. Use the standard Template_Group/Template syntax to specify where to return the user. For instance, if you want the user to be returned to the "local" Template in the "news" Template Group, you would use: return="news/local" 2. Use a full URL. For example: return="" - - diff --git a/docs/member/memberlist.md b/docs/member/memberlist.md index 3a43a9f6..947fbc2a 100644 --- a/docs/member/memberlist.md +++ b/docs/member/memberlist.md @@ -17,6 +17,8 @@ Outputs a searchable list of members, including form filters to sort and limit t ## Parameters +{{embed:_tips/form-attributes.md}} + ### `role_id=` role_id="5" diff --git a/docs/member/registration.md b/docs/member/registration.md index a0316087..5b59f6f0 100644 --- a/docs/member/registration.md +++ b/docs/member/registration.md @@ -19,6 +19,8 @@ NOTE: **Important:** In order for site visitors to be allowed to register for ac ## Parameters +{{embed:_tips/form-attributes.md}} + ### `return=` return="member/registration/success"