From 35a46b9a33f89174e340b8f9893808fe6f296ff0 Mon Sep 17 00:00:00 2001 From: putzwasser <26040044+putzwasser@users.noreply.github.com> Date: Tue, 20 Feb 2024 13:41:57 +0100 Subject: [PATCH 01/24] Amends form validation docs Makes slight improvements to the wording in `onValidate`. Fixes wrong `onValidateEnd` return type description. @see https://github.com/mautic/mautic/blob/0aaeba2292397926d948d029143a244c9f3f1dc2/app/assets/js/mautic-form-src.js#L485 --- docs/components/tracking_script.rst | 44 +++++++++++++++++------------ 1 file changed, 26 insertions(+), 18 deletions(-) diff --git a/docs/components/tracking_script.rst b/docs/components/tracking_script.rst index 15459e0d..72963416 100644 --- a/docs/components/tracking_script.rst +++ b/docs/components/tracking_script.rst @@ -98,25 +98,30 @@ JavaScript Form processing hooks } }; -If you wish to run additional code before or after submission of the Form, create a ``MauticFormCallback`` object. -In the example code, replace ``replaceWithFormName`` with the name of your Form. +If you wish to run additional code before or after submission of the form, create a ``MauticFormCallback`` object. +In the example code, replace ``replaceWithFormName`` with the name of your form. ``onValidateEnd`` and ``onResponse`` are actions called by ``Form.customCallbackHandler``. ``onValidate()`` ================ -Called before default Form validation - use it to override the default Form validation. +Called before built-in form validation. +Implement this callback to override the built-in form validation logic. -Return ``True`` to skip the default Form validation and continue with Form processing. -Return ``False`` to skip the default Form validation and prevent the Form submission. -Return ``null`` to execute default Form validation. +Your callbacks return value determines how the form will be processed: + +1. Return ``True`` to skip the built-in form validation and **continue** with form processing. +2. Return ``False`` to skip the built-in form validation and **prevent** the form submission. +3. Return ``null`` to execute built-in form validation and let its logic determine whether to continue with or prevent the form submission. + +Returning ``True`` or ``False`` will skip the execution of `onValidateStart`. .. code-block:: js MauticFormCallback['replaceWithFormName'] = { onValidate: function () { - // before form validation + // executed before built-in form validation var formIsGood = True; var dontUpdate = False; if(dontUpdate){ @@ -132,29 +137,32 @@ Return ``null`` to execute default Form validation. ``onValidateStart()`` ===================== -Called at the beginning of the default Form validation, this receives no values and a return value isn't required and isn't processed. +Called at the beginning of the default form validation, this receives no values and a return value isn't required and isn't processed. -.. warning:: onValidateStart may not get executed if the default Form validation gets handled during the ``onValidate`` callback. +.. warning:: `onValidateStart` will not get executed if you add the ``onValidate`` callback and it returns ``True`` or ``False``. .. code-block:: js MauticFormCallback['replaceWithFormName'] = { onValidateStart: function () { - // before default validation + // executed before built-in form validation }, }; ``onValidateEnd(formValid)`` ============================ -Called after all Form validations are complete - either the default validations and/or the ``onValidate`` callback - and before the Form gets submitted. -Receives ``formValid`` to determine if the Form is valid. A return value isn't required and isn't processed. +Called after all form validations are complete - either the default validations and/or the ``onValidate`` callback - and before the form gets submitted. +Receives ``formValid`` to determine if the form is valid. + +If this callback returns ``False`` then this prevents submitting the form. .. code-block:: js MauticFormCallback['replaceWithFormName'] = { onValidateEnd: function (formValid) { // before form submit + // return False; // prevents submitting the form }, }; @@ -193,8 +201,8 @@ Called to clear an existing error. Receives ``containerId`` with the id of the e ``onResponse(response)`` ======================== -Called prior to default Form submission response processing. Receives ``response`` containing the Form submission response. -Return ``True`` to skip the default Form submission response processing. +Called prior to default form submission response processing. Receives ``response`` containing the form submission response. +Return ``True`` to skip the default form submission response processing. .. code-block:: js @@ -207,7 +215,7 @@ Return ``True`` to skip the default Form submission response processing. ``onResponseStart(response)`` ============================= -Called at the beginning of the default Form submission response processing. Receives ``response`` containing the Form submission response. +Called at the beginning of the default form submission response processing. Receives ``response`` containing the form submission response. Return value isn't required and isn't processed. .. warning:: onResponseStart may not get executed if the default response processing gets handled during the ``onResponse`` callback @@ -231,7 +239,7 @@ Return value isn't required and isn't processed. }, }; -Called at the end default Form submission response processing. Receives ``response`` containing the Form submission response. +Called at the end default form submission response processing. Receives ``response`` containing the form submission response. Return value isn't required and isn't processed. .. warning:: onResponseEnd may not get executed if the default response processing gets handled during the ``onResponse`` callback @@ -287,7 +295,7 @@ Called prior to default enabling of the submit button. Receives no values. Retur .. vale off -Called prior to going to the next page in the Form. Useful to adjust the DOM prior to making the page visible. +Called prior to going to the next page in the form. Useful to adjust the DOM prior to making the page visible. .. vale on @@ -304,7 +312,7 @@ Called prior to going to the next page in the Form. Useful to adjust the DOM pri .. vale off -Called prior to going back to a previous page in the Form. Useful to adjust the DOM prior to making the page visible. +Called prior to going back to a previous page in the form. Useful to adjust the DOM prior to making the page visible. .. vale on From f30185732af85bb7060101f9136306abe5059ec3 Mon Sep 17 00:00:00 2001 From: putzwasser <26040044+putzwasser@users.noreply.github.com> Date: Sun, 25 Feb 2024 12:04:29 +0100 Subject: [PATCH 02/24] Active voice Co-authored-by: Ruth Cheesley --- docs/components/tracking_script.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/components/tracking_script.rst b/docs/components/tracking_script.rst index 72963416..aa1e44b4 100644 --- a/docs/components/tracking_script.rst +++ b/docs/components/tracking_script.rst @@ -109,7 +109,7 @@ In the example code, replace ``replaceWithFormName`` with the name of your form. Called before built-in form validation. Implement this callback to override the built-in form validation logic. -Your callbacks return value determines how the form will be processed: +Your callback's return value determines the processing of the Form: 1. Return ``True`` to skip the built-in form validation and **continue** with form processing. 2. Return ``False`` to skip the built-in form validation and **prevent** the form submission. From 42125de50349f5e6863cbffaf65a838a3b90e94d Mon Sep 17 00:00:00 2001 From: putzwasser <26040044+putzwasser@users.noreply.github.com> Date: Sun, 25 Feb 2024 12:04:43 +0100 Subject: [PATCH 03/24] Change form to Form Co-authored-by: Ruth Cheesley --- docs/components/tracking_script.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/components/tracking_script.rst b/docs/components/tracking_script.rst index aa1e44b4..e1047fc7 100644 --- a/docs/components/tracking_script.rst +++ b/docs/components/tracking_script.rst @@ -98,7 +98,7 @@ JavaScript Form processing hooks } }; -If you wish to run additional code before or after submission of the form, create a ``MauticFormCallback`` object. +If you wish to run additional code before or after submission of the Form, create a ``MauticFormCallback`` object. In the example code, replace ``replaceWithFormName`` with the name of your form. ``onValidateEnd`` and ``onResponse`` are actions called by ``Form.customCallbackHandler``. From c6b37b4c8a92dd2b9ae5405985add85ce7f52b7d Mon Sep 17 00:00:00 2001 From: putzwasser <26040044+putzwasser@users.noreply.github.com> Date: Sun, 25 Feb 2024 12:04:52 +0100 Subject: [PATCH 04/24] Change form to Form Co-authored-by: Ruth Cheesley --- docs/components/tracking_script.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/components/tracking_script.rst b/docs/components/tracking_script.rst index e1047fc7..d697acce 100644 --- a/docs/components/tracking_script.rst +++ b/docs/components/tracking_script.rst @@ -99,7 +99,7 @@ JavaScript Form processing hooks }; If you wish to run additional code before or after submission of the Form, create a ``MauticFormCallback`` object. -In the example code, replace ``replaceWithFormName`` with the name of your form. +In the example code, replace ``replaceWithFormName`` with the name of your Form. ``onValidateEnd`` and ``onResponse`` are actions called by ``Form.customCallbackHandler``. From 4e7c1aa56336d4ab38f4b2d1ad39fb51cd227c13 Mon Sep 17 00:00:00 2001 From: putzwasser <26040044+putzwasser@users.noreply.github.com> Date: Sun, 25 Feb 2024 12:04:59 +0100 Subject: [PATCH 05/24] Change form to Form Co-authored-by: Ruth Cheesley --- docs/components/tracking_script.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/components/tracking_script.rst b/docs/components/tracking_script.rst index d697acce..e57f36e9 100644 --- a/docs/components/tracking_script.rst +++ b/docs/components/tracking_script.rst @@ -106,7 +106,7 @@ In the example code, replace ``replaceWithFormName`` with the name of your Form. ``onValidate()`` ================ -Called before built-in form validation. +Called before built-in Form validation. Implement this callback to override the built-in form validation logic. Your callback's return value determines the processing of the Form: From 43bf237f8838f5e04d1bc4510ae5eb0bbee0f574 Mon Sep 17 00:00:00 2001 From: putzwasser <26040044+putzwasser@users.noreply.github.com> Date: Sun, 25 Feb 2024 12:05:04 +0100 Subject: [PATCH 06/24] Change form to Form Co-authored-by: Ruth Cheesley --- docs/components/tracking_script.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/components/tracking_script.rst b/docs/components/tracking_script.rst index e57f36e9..a32b3cbb 100644 --- a/docs/components/tracking_script.rst +++ b/docs/components/tracking_script.rst @@ -107,7 +107,7 @@ In the example code, replace ``replaceWithFormName`` with the name of your Form. ================ Called before built-in Form validation. -Implement this callback to override the built-in form validation logic. +Implement this callback to override the built-in Form validation logic. Your callback's return value determines the processing of the Form: From a9b72686fb385fba65a4638608f4e38823a7d9cd Mon Sep 17 00:00:00 2001 From: putzwasser <26040044+putzwasser@users.noreply.github.com> Date: Sun, 25 Feb 2024 12:05:11 +0100 Subject: [PATCH 07/24] Change form to Form Co-authored-by: Ruth Cheesley --- docs/components/tracking_script.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/components/tracking_script.rst b/docs/components/tracking_script.rst index a32b3cbb..a19c94ee 100644 --- a/docs/components/tracking_script.rst +++ b/docs/components/tracking_script.rst @@ -202,7 +202,7 @@ Called to clear an existing error. Receives ``containerId`` with the id of the e ======================== Called prior to default form submission response processing. Receives ``response`` containing the form submission response. -Return ``True`` to skip the default form submission response processing. +Return ``True`` to skip the default Form submission response processing. .. code-block:: js From 1dd88052d243ec4e0cf203acbc10cb1d047f6917 Mon Sep 17 00:00:00 2001 From: putzwasser <26040044+putzwasser@users.noreply.github.com> Date: Sun, 25 Feb 2024 12:05:19 +0100 Subject: [PATCH 08/24] Change form to Form Co-authored-by: Ruth Cheesley --- docs/components/tracking_script.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/components/tracking_script.rst b/docs/components/tracking_script.rst index a19c94ee..51979c91 100644 --- a/docs/components/tracking_script.rst +++ b/docs/components/tracking_script.rst @@ -215,7 +215,7 @@ Return ``True`` to skip the default Form submission response processing. ``onResponseStart(response)`` ============================= -Called at the beginning of the default form submission response processing. Receives ``response`` containing the form submission response. +Called at the beginning of the default Form submission response processing. Receives ``response`` containing the Form submission response. Return value isn't required and isn't processed. .. warning:: onResponseStart may not get executed if the default response processing gets handled during the ``onResponse`` callback From d871293574a4f4925c8246f7591ba488723ab2d3 Mon Sep 17 00:00:00 2001 From: putzwasser <26040044+putzwasser@users.noreply.github.com> Date: Sun, 25 Feb 2024 12:05:31 +0100 Subject: [PATCH 09/24] Change form to Form Co-authored-by: Ruth Cheesley --- docs/components/tracking_script.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/components/tracking_script.rst b/docs/components/tracking_script.rst index 51979c91..d4cf5c40 100644 --- a/docs/components/tracking_script.rst +++ b/docs/components/tracking_script.rst @@ -239,7 +239,7 @@ Return value isn't required and isn't processed. }, }; -Called at the end default form submission response processing. Receives ``response`` containing the form submission response. +Called at the end of the default Form submission response processing. Receives ``response`` containing the Form submission response. Return value isn't required and isn't processed. .. warning:: onResponseEnd may not get executed if the default response processing gets handled during the ``onResponse`` callback From 285cfa0ad3a52aaea268a7265a143c9657b712e7 Mon Sep 17 00:00:00 2001 From: putzwasser <26040044+putzwasser@users.noreply.github.com> Date: Sun, 25 Feb 2024 12:05:38 +0100 Subject: [PATCH 10/24] Changes form to Form Co-authored-by: Ruth Cheesley --- docs/components/tracking_script.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/components/tracking_script.rst b/docs/components/tracking_script.rst index d4cf5c40..ffa1e0ac 100644 --- a/docs/components/tracking_script.rst +++ b/docs/components/tracking_script.rst @@ -295,7 +295,7 @@ Called prior to default enabling of the submit button. Receives no values. Retur .. vale off -Called prior to going to the next page in the form. Useful to adjust the DOM prior to making the page visible. +Called prior to going to the next page in the Form. Useful to adjust the DOM prior to making the page visible. .. vale on From 618cd75c59face7ff2125a15a1f5c07f05b8acb3 Mon Sep 17 00:00:00 2001 From: putzwasser <26040044+putzwasser@users.noreply.github.com> Date: Sun, 25 Feb 2024 12:05:46 +0100 Subject: [PATCH 11/24] Changes form to Form Co-authored-by: Ruth Cheesley --- docs/components/tracking_script.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/components/tracking_script.rst b/docs/components/tracking_script.rst index ffa1e0ac..f798a859 100644 --- a/docs/components/tracking_script.rst +++ b/docs/components/tracking_script.rst @@ -312,7 +312,7 @@ Called prior to going to the next page in the Form. Useful to adjust the DOM pri .. vale off -Called prior to going back to a previous page in the form. Useful to adjust the DOM prior to making the page visible. +Called prior to going back to a previous page in the Form. Useful to adjust the DOM prior to making the page visible. .. vale on From e2d963ac73328a104fd1667a8044e3875078530d Mon Sep 17 00:00:00 2001 From: putzwasser <26040044+putzwasser@users.noreply.github.com> Date: Sun, 25 Feb 2024 12:06:03 +0100 Subject: [PATCH 12/24] Changes form to Form Co-authored-by: Ruth Cheesley --- docs/components/tracking_script.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/components/tracking_script.rst b/docs/components/tracking_script.rst index f798a859..4af617a3 100644 --- a/docs/components/tracking_script.rst +++ b/docs/components/tracking_script.rst @@ -111,7 +111,7 @@ Implement this callback to override the built-in Form validation logic. Your callback's return value determines the processing of the Form: -1. Return ``True`` to skip the built-in form validation and **continue** with form processing. +1. Return ``True`` to skip the built-in Form validation and **continue** with Form processing. 2. Return ``False`` to skip the built-in form validation and **prevent** the form submission. 3. Return ``null`` to execute built-in form validation and let its logic determine whether to continue with or prevent the form submission. From 7217e738c38b9f489307176dc634fcb0c3398b10 Mon Sep 17 00:00:00 2001 From: putzwasser <26040044+putzwasser@users.noreply.github.com> Date: Sun, 25 Feb 2024 12:06:42 +0100 Subject: [PATCH 13/24] Changes form to Form Co-authored-by: Ruth Cheesley --- docs/components/tracking_script.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/components/tracking_script.rst b/docs/components/tracking_script.rst index 4af617a3..e63dad39 100644 --- a/docs/components/tracking_script.rst +++ b/docs/components/tracking_script.rst @@ -201,7 +201,7 @@ Called to clear an existing error. Receives ``containerId`` with the id of the e ``onResponse(response)`` ======================== -Called prior to default form submission response processing. Receives ``response`` containing the form submission response. +Called prior to default Form submission response processing. Receives ``response`` containing the Form submission response. Return ``True`` to skip the default Form submission response processing. .. code-block:: js From 3d56ccdb9571fd78bad4f37ac51ffa65c37cc69a Mon Sep 17 00:00:00 2001 From: putzwasser <26040044+putzwasser@users.noreply.github.com> Date: Sun, 25 Feb 2024 12:07:34 +0100 Subject: [PATCH 14/24] Changes form to Form Co-authored-by: Ruth Cheesley --- docs/components/tracking_script.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/components/tracking_script.rst b/docs/components/tracking_script.rst index e63dad39..8e916723 100644 --- a/docs/components/tracking_script.rst +++ b/docs/components/tracking_script.rst @@ -112,7 +112,7 @@ Implement this callback to override the built-in Form validation logic. Your callback's return value determines the processing of the Form: 1. Return ``True`` to skip the built-in Form validation and **continue** with Form processing. -2. Return ``False`` to skip the built-in form validation and **prevent** the form submission. +2. Return ``False`` to skip the built-in Form validation and **prevent** the Form submission. 3. Return ``null`` to execute built-in form validation and let its logic determine whether to continue with or prevent the form submission. Returning ``True`` or ``False`` will skip the execution of `onValidateStart`. From 30f21e10cd14112f0b580d0c6206b16f75910f9d Mon Sep 17 00:00:00 2001 From: putzwasser <26040044+putzwasser@users.noreply.github.com> Date: Sun, 25 Feb 2024 12:07:40 +0100 Subject: [PATCH 15/24] Changes form to Form Co-authored-by: Ruth Cheesley --- docs/components/tracking_script.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/components/tracking_script.rst b/docs/components/tracking_script.rst index 8e916723..c3ce2eec 100644 --- a/docs/components/tracking_script.rst +++ b/docs/components/tracking_script.rst @@ -113,7 +113,7 @@ Your callback's return value determines the processing of the Form: 1. Return ``True`` to skip the built-in Form validation and **continue** with Form processing. 2. Return ``False`` to skip the built-in Form validation and **prevent** the Form submission. -3. Return ``null`` to execute built-in form validation and let its logic determine whether to continue with or prevent the form submission. +3. Return ``null`` to execute built-in Form validation and let its logic determine whether to continue with or prevent the Form submission. Returning ``True`` or ``False`` will skip the execution of `onValidateStart`. From 672466f14209854a6dc5a30b6a5d80cd9dd3aca8 Mon Sep 17 00:00:00 2001 From: putzwasser <26040044+putzwasser@users.noreply.github.com> Date: Sun, 25 Feb 2024 12:07:48 +0100 Subject: [PATCH 16/24] Changes form to Form Co-authored-by: Ruth Cheesley --- docs/components/tracking_script.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/components/tracking_script.rst b/docs/components/tracking_script.rst index c3ce2eec..e0beb2c2 100644 --- a/docs/components/tracking_script.rst +++ b/docs/components/tracking_script.rst @@ -115,7 +115,7 @@ Your callback's return value determines the processing of the Form: 2. Return ``False`` to skip the built-in Form validation and **prevent** the Form submission. 3. Return ``null`` to execute built-in Form validation and let its logic determine whether to continue with or prevent the Form submission. -Returning ``True`` or ``False`` will skip the execution of `onValidateStart`. +Returning ``True`` or ``False`` skips the execution of `onValidateStart`. .. code-block:: js From ff470026051aec377121b1022c039cf8814932d5 Mon Sep 17 00:00:00 2001 From: putzwasser <26040044+putzwasser@users.noreply.github.com> Date: Sun, 25 Feb 2024 12:07:54 +0100 Subject: [PATCH 17/24] Changes form to Form Co-authored-by: Ruth Cheesley --- docs/components/tracking_script.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/components/tracking_script.rst b/docs/components/tracking_script.rst index e0beb2c2..bc7de79e 100644 --- a/docs/components/tracking_script.rst +++ b/docs/components/tracking_script.rst @@ -121,7 +121,7 @@ Returning ``True`` or ``False`` skips the execution of `onValidateStart`. MauticFormCallback['replaceWithFormName'] = { onValidate: function () { - // executed before built-in form validation + // executed before built-in Form validation var formIsGood = True; var dontUpdate = False; if(dontUpdate){ From 61223515e964c9b287a26f701ef8c8492b94252c Mon Sep 17 00:00:00 2001 From: putzwasser <26040044+putzwasser@users.noreply.github.com> Date: Sun, 25 Feb 2024 12:07:58 +0100 Subject: [PATCH 18/24] Changes form to Form Co-authored-by: Ruth Cheesley --- docs/components/tracking_script.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/components/tracking_script.rst b/docs/components/tracking_script.rst index bc7de79e..33811e43 100644 --- a/docs/components/tracking_script.rst +++ b/docs/components/tracking_script.rst @@ -137,7 +137,7 @@ Returning ``True`` or ``False`` skips the execution of `onValidateStart`. ``onValidateStart()`` ===================== -Called at the beginning of the default form validation, this receives no values and a return value isn't required and isn't processed. +Called at the beginning of the default Form validation, this receives no values and a return value isn't required and isn't processed. .. warning:: `onValidateStart` will not get executed if you add the ``onValidate`` callback and it returns ``True`` or ``False``. From 24ca09f2eb2b23c69b10812cbb7901e8015f359f Mon Sep 17 00:00:00 2001 From: putzwasser <26040044+putzwasser@users.noreply.github.com> Date: Sun, 25 Feb 2024 12:08:25 +0100 Subject: [PATCH 19/24] Amends grammar Co-authored-by: Ruth Cheesley --- docs/components/tracking_script.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/components/tracking_script.rst b/docs/components/tracking_script.rst index 33811e43..4e001efd 100644 --- a/docs/components/tracking_script.rst +++ b/docs/components/tracking_script.rst @@ -139,7 +139,7 @@ Returning ``True`` or ``False`` skips the execution of `onValidateStart`. Called at the beginning of the default Form validation, this receives no values and a return value isn't required and isn't processed. -.. warning:: `onValidateStart` will not get executed if you add the ``onValidate`` callback and it returns ``True`` or ``False``. +.. warning:: `onValidateStart` isn't executed if you add the ``onValidate`` callback and it returns ``True`` or ``False``. .. code-block:: js From 0bc5088795be5acae290124312153c67e619121c Mon Sep 17 00:00:00 2001 From: putzwasser <26040044+putzwasser@users.noreply.github.com> Date: Sun, 25 Feb 2024 12:08:30 +0100 Subject: [PATCH 20/24] Changes form to Form Co-authored-by: Ruth Cheesley --- docs/components/tracking_script.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/components/tracking_script.rst b/docs/components/tracking_script.rst index 4e001efd..12b35236 100644 --- a/docs/components/tracking_script.rst +++ b/docs/components/tracking_script.rst @@ -145,7 +145,7 @@ Called at the beginning of the default Form validation, this receives no values MauticFormCallback['replaceWithFormName'] = { onValidateStart: function () { - // executed before built-in form validation + // executed before built-in Form validation }, }; From c1eedd415d1fcde634067970742e9abaf6e1094c Mon Sep 17 00:00:00 2001 From: putzwasser <26040044+putzwasser@users.noreply.github.com> Date: Sun, 25 Feb 2024 12:08:46 +0100 Subject: [PATCH 21/24] Changes form to Form and swtiches to ative voice Co-authored-by: Ruth Cheesley --- docs/components/tracking_script.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/components/tracking_script.rst b/docs/components/tracking_script.rst index 12b35236..27242613 100644 --- a/docs/components/tracking_script.rst +++ b/docs/components/tracking_script.rst @@ -152,7 +152,7 @@ Called at the beginning of the default Form validation, this receives no values ``onValidateEnd(formValid)`` ============================ -Called after all form validations are complete - either the default validations and/or the ``onValidate`` callback - and before the form gets submitted. +Called after all Form validations are complete - either the default validations and/or the ``onValidate`` callback - and before submitting the Form. Receives ``formValid`` to determine if the form is valid. If this callback returns ``False`` then this prevents submitting the form. From ceb99a52201febcb1e4e70338f243a1c4326fd30 Mon Sep 17 00:00:00 2001 From: putzwasser <26040044+putzwasser@users.noreply.github.com> Date: Sun, 25 Feb 2024 12:08:51 +0100 Subject: [PATCH 22/24] Changes form to Form Co-authored-by: Ruth Cheesley --- docs/components/tracking_script.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/components/tracking_script.rst b/docs/components/tracking_script.rst index 27242613..ac4ca3fb 100644 --- a/docs/components/tracking_script.rst +++ b/docs/components/tracking_script.rst @@ -153,7 +153,7 @@ Called at the beginning of the default Form validation, this receives no values ============================ Called after all Form validations are complete - either the default validations and/or the ``onValidate`` callback - and before submitting the Form. -Receives ``formValid`` to determine if the form is valid. +Receives ``formValid`` to determine if the Form is valid. If this callback returns ``False`` then this prevents submitting the form. From 969f0eb92bd05ef226c86b7908ed88ad28b2691e Mon Sep 17 00:00:00 2001 From: putzwasser <26040044+putzwasser@users.noreply.github.com> Date: Sun, 25 Feb 2024 12:08:56 +0100 Subject: [PATCH 23/24] Changes form to Form Co-authored-by: Ruth Cheesley --- docs/components/tracking_script.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/components/tracking_script.rst b/docs/components/tracking_script.rst index ac4ca3fb..2731ef24 100644 --- a/docs/components/tracking_script.rst +++ b/docs/components/tracking_script.rst @@ -155,7 +155,7 @@ Called at the beginning of the default Form validation, this receives no values Called after all Form validations are complete - either the default validations and/or the ``onValidate`` callback - and before submitting the Form. Receives ``formValid`` to determine if the Form is valid. -If this callback returns ``False`` then this prevents submitting the form. +If this callback returns ``False`` then this prevents submitting the Form. .. code-block:: js From 532942bd0224435967cd3597a07d516844fc9360 Mon Sep 17 00:00:00 2001 From: putzwasser <26040044+putzwasser@users.noreply.github.com> Date: Sun, 25 Feb 2024 12:09:02 +0100 Subject: [PATCH 24/24] Changes form to Form Co-authored-by: Ruth Cheesley --- docs/components/tracking_script.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/components/tracking_script.rst b/docs/components/tracking_script.rst index 2731ef24..446dac3c 100644 --- a/docs/components/tracking_script.rst +++ b/docs/components/tracking_script.rst @@ -162,7 +162,7 @@ If this callback returns ``False`` then this prevents submitting the Form. MauticFormCallback['replaceWithFormName'] = { onValidateEnd: function (formValid) { // before form submit - // return False; // prevents submitting the form + // return False; // prevents submitting the Form }, };