- Adds
Required
label to required fields since theOptional
label is already in place. - Fixes small class name typo from
apos-form-...
toapos-forms-...
- Removes
apostrophe
as a peer dependency.
- Allow server side event handlers to modify the response object sent after a form submission, and allow browser side event handlers to see that object.
- Fixes a bug where only the first input of type "file" was being submitted on form submit.
- Use
self.getOption
to fetch the recaptcha options for full compatibility withapostrophe-override-options
.
- reCAPTCHA appends to
body
rather than[data-apos-refreshable]
if the latter is not available. For ordinary Apostrophe sites there was no harm in assuming it existed, however sites injecting Apostrophe-rendered markup via the headless module or alternative techniques might not have such an element. Thebody
exists for everyone.
- Updates axios to address a reported SSRF vulnerability.
- Allow project level code to override arrangeFields easily. Because the base class runs last in beforeConstruct, it should prepend to what the project provides, not the other way around. Otherwise project level groupings get overridden by the base class.
- Fixes the string field template to add the
placeholder
attribute.
- Adds an event
apostrophe-forms:submission-missing-recaptcha
, which is emitted when a form is submitted before the reCAPTCHA is checked (e.g. expired after a while or invalidated after a failed submission). Thank you to J. Garijo for the contribution.
- Introduced multiselect dropdowns as an alternate style choice available to form creators when they select the "checkboxes" widget. The provided CSS is basic but the DOM structure is intended to be suitable for styling as you see fit.
- Added the
optionLabelPosition
option to theapostrophe-forms-checkboxes-field-widgets
andapostrophe-forms-radio-field-widgets
modules. IfoptionLabelPosition
is set to'first'
or'last'
, the input elements for both radio and checkbox inputs are nested inside the label, with the label's text appearing first or last as appropriate. If no relevant option is set, for backwards compatibility the input is not nested in the label checkboxLabel. This can be explicitly chosen by setting the appropriate option to'legacy'
. This is more difficult to style, so we recommend settingoptionLabelPosition
tofirst
orlast
. You may set the option for both modules by setting it forapostrophe-forms-base-field-widgets
, which they both inherit from.
- Bump peer dependency on the apostrophe module to a minimum of 2.105.2 because of the need for a working version of
apos.utils.emit
. However we do recommend updating to the latest in the apostrophe module 2.x series when updating this module. Specifically we recommend setting your dependencies on all Apostrophe modules using the^
, i.e.^2.0.0
. When you are ready to test an update of your dependencies usenpm update
, then review your project's functionality before deploying.
- Fixes IE11 bug by converting a NodeList to an Array before using
.forEach()
.
- Moves the mechanism that sends emails into the
self.sendEmail
method, allowing for this to be more easily overridden in a project. The initiating purpose was to add project-level subject line functionality that might not make sense for everyone. Thanks to Ricky Rodríguez Álvarez for the contribution. - Adds event emission on the body element for form submission (
apostrophe-forms:submission-form
) and submission failure (apostrophe-forms:submission-failed
). Again, thanks to Ricky Álverez for the contribution. - Adds the option to use a custom class prefix to add classes to the form templates in addition to the
.apos-form-
classes. Thanks to Brett Gaynor for the contribution. - Adds
date
as an input type option to the string input widget. - Updates the ESLint configuration to
[email protected]
and fixes linter errors.
- Adds error handling to the confirmation email sending event handler.
- Adds submission data from the end user to an
input
property sent to theemailConfirmation
template. Thanks to Ricky Rodríguez Álvarez for the contribution.
- Adds the option to select a more specific input type for text fields (e.g., email, password, telephone). Thanks to Jose96GIT for the contribution.
- Fixes a bug where the submission notification process did not test comma-separated values property for values stored as strings.
- Adds checkbox fields as an option for a conditional fieldset control.
- Makes the "Query Parameter Keys" field required again following an ApostropheCMS core fix.
- Returns an
email
field that had been removed to allow sending results to multiple email addresses, but it's still needed to send messages from the app in some transports. Fixes a test.
- Adds a feature to email submission notifications to make those emails conditional on another field's value. Also adds the ability to set placeholder values on text and textarea form fields.
- Removes default parameter usage. Fixes a typo in the README's default app.js configuration.
- Adds an email confirmation option post-submission. Improves error handling with message label. Arranges fields in form field widgets. Prevents
apostrophe-anchors
from adding fields to each form input widget.
- Added error handling for misconfigured email submission sending.
- Adds the conditional field group widget, availble to be triggered by boolean, select, or radio fields.