All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
-
The minimum versions for dependencies have changed. The new requirements are:
- PHP 8.2
- Laravel 11
- Bootstrap 5
- FontAwesome 6
-
The JS file
default.js
references the.env
valueVITE_STORAGE_DEFAULT_VALUE
instead ofMIX_STORAGE_DEFAULT_VALUE
. If you are using Laravel Mix or another build system, you may need to adjust this code. -
The routes file now removes the
\Illuminate\Foundation\Http\Middleware\VerifyCsrfToken
middleware from the POSTs that formio makes, asApp\Http\Middleware\VerifyCsrfToken
is no longer part of the Laravel skeleton. If you are upgrading from Laravel 10 and have not removed your stock middleware, this does not need to be updated.
BaseComponent::submissionValue()
, which provides the method for most components, will handle multiple-value components more elegantly and should never return anull
for them, even if this is what was represented in the submission JSON.
- The
ResourceInterface::submissions
method signature now includes an optional$context
parameter. To migrate, ensure that all custom resources classes incorporate the new parameter.
- Support for non-scalar option values in the
Select
component.
- Fixes the check to ensure Quill is the default Textarea editor.
- Added
additional()
getter to theComponentInterface
for getting other settings that are not used by the dynamic-forms package directly.
- Added getters to the
ComponentInterface
for validation rules.
- This fixes a bug introduced in v0.12.1;
show:false
in aSimpleConditional
was being ignored instead of evaluated correctly.
- An incomplete
SimpleConditional
will be ignored instead of erroring.
- Updated dependencies for Laravel compatibility 10. There are no breaking changes.
- Works around an issue concerning the translation of errors from
ValidatedForm
in later versions of Laravel 9.x and 10.
- Swapped to a fork of the lodash-php package that has PHP 8.2 compatibility fixes.
- The
Select
component'sinitSrcValues()
method has been updated by setting an empty array for dropdowns that lack options instead ofnull
.
- The
Button
component has a new method,action()
which exposes the button's action type.
- PHP 8.2 has been added to the test matrix.
- The
Select
component has a new method,options()
, which exposes the labels for options.
- Problems with the installer were corrected. Thank you bilogic!
- The
Survey
component has two new methods,questionsWithLabels()
andchoicesWithLabels()
. These are used to get the key/label lookups for both the questions and answers, which were not previously available.
- Fixing how the resource registry stores its list of resources.
- Support for Resources within the Select component.
- Allows for regular textarea editors in addition to Quill.
- Before comparing values for select, selectboxes, radio, and survey components, the values will be trimed. This matches the behaviour of the default Laravel middleware, which trims all submitted form values.
- Fixes
Survey
components failing to validate if a question'svalue
included a dot (.) character.
- The
ValidatedForm::allFiles()
method would not return files if the key contained a folder prefix. This has been corrected.
- Adds support for Hidden components.
- An edge case where select & radio components in multiple-value mode when provided with a
null
submission value would trigger a runtime error has been corrected.
- If a component with child components is excluded by conditional logic, its children are now excluded from validation as well. This mirrors the formio.js behaviour.
- When a file component was excluded by conditional logic, validating the form would cause a PHP error. This has been corrected.
- Added
ComponentInterface::defaultValue()
, for accessing the configured default value for a component.
- When running AJAX requests back to Laravel via a form component, server-side errors could cause the user to be redirected to the AJAX endpoint URL instead of the form. This has been corrected.
File
components have a newgetStorageDirectory()
method to access the configured storage directory.
- Processed values from components will be used for running JSON Logic calculations & conditionals now. This fixes problems with empty strings in number fields being used in mathematical calculations, which could potentially cause PHP runtime errors.
- Support for JSONLogic has been extended to calculated values.
- Enable support for Laravel 9.
- File components that use S3 and have a directory set will pass server-side validations now.
- Numeric values for
Select
&Radio
components no longer cause the validation to fail.
- Several methods in
Storage\S3Driver
have a new optional parameter for an array of parameters to add to pre-signed URLgetCommand()
calls. These can be utilized to add S3 encryption and use other S3 features. - The
urlValiditiyPeriod
parameter introduced in v0.5.1 had a spelling error. If you are using PHP 8 named parameters, this may be breaking, if you've started using it since the last release.
- The
Storage\S3Driver::getDirectDownloadLink
method now has new optional parameters.
- Fixes a bug in
Rules\FileExists
when using the S3 storage driver that caused validation to fail if the original filename contains URL-encodable characters.
- Set the default TextArea editor to Quill, and removed support for CKEDitor.
- Support for JSONLogic (augmented with lodash) for conditional form fields.
- Fixed a bug in
ValidatedForm::allFiles()
when components were nested.
- Added an
allFiles()
method toValidatedForm
s to easily access submitted files.
- Support for uploading files to the server instead of S3 added.
- A new
MIX_STORAGE_DEFAULT_VALUE
environment variable has been added to pre-select & enforce a particular file upload method.
- The methods from the
HandlesDynamicFormsStorage
trait have been renamed.- The route stub file has been updated accordingly. Please see the upgrading guide in the docs site for resolving this change.
BaseComponent
now uses a newhasMultipleValuesForValidation()
method to determine if a field in single-value mode should be validated in multi-value mode.
- The
ComponentRegistry
now consistently registers components without a leading slash in namespaces.
- The
dynamic-forms:install
artisan command does a better job of installing now:- Adds the
formiojs
dependency topackage.json
- Adds the Formiojs CSS to your
app.scss
file - Adds a
builder-sidebar.js
file w/ sensible builder defaults that remove unsupported components
- Adds the
- Initial release.