Releases: aerni/statamic-livewire-forms
Releases · aerni/statamic-livewire-forms
v6.1.0
What's new
- Adds support for the
Hidden
fieldtype. It's basically a shortcut to using a text field withshow: false
.
What's fixed
- Fixed field conditions. This bug was introduced in v5.0.0. You should upgrade to this version to fix it.
What's improved
- Hide form groups that don't contain any visible fields. Like when using the
Hidden
fieldtype or conditions. - Better alignment of checkbox and radio fields when displayed inline.
v6.0.0
What's new
- You can now override messages like the form submit button and success message on a per form level. This is super useful, as you don't have to create a custom form component anymore to change a simple message string.
What's improved
- The
validation.php
language file is now merged into themessages.php
file
What's breaking
- If you've published the language files, you'll have to manually migrate to the new structure. Simply publish the language files again and copy-paste the strings in question.
v5.1.0
v5.0.0
What's fixed
- The captcha response is no longer saved to form submissions
What's improved
- Field property methods are now executed on demand, allowing for dynamic use. This is helpful if you change a field property like
options
in thehydratedFields
callback. - Make the
inline_label
property translatable - Make the
show
,view
, andwire_model_modifier
properties configurable through the form blueprint - Make the
input_type
property ofInteger
fields configurable
What's breaking
- All field property methods are now protected. If you've accessed properties using their methods like
defaultProperty()
, you can simply removeProperty
and usedefault()
instead. - If you've changed the
view
of a field through the@formField
blade directive, you should removefields.
, e.g. instead of'view' => 'fields.nameInput'
it should now be'view' => 'nameInput'
.
v4.0.0
What's new
- Adds the ability to autoload custom components by form handle. Example:
{{ livewire:form handle="contact" }}
will loadApp\Http\Livewire\ContactForm.php
if it exists. (#18)
Upgrade Guide
Required
- Make sure your custom components extend
Aerni\LivewireForms\Http\Livewire\BaseForm
Optional
The following changes are only necessary if you want to use the new autoloading capabilities.
- Ensure your custom components end with
Form
, e.g. renameContact
toContactForm
. - Change your template to use the default form component, e.g. use
{{ livewire:form handle="contact" }}
instead of{{ livewire:contact }}
. - You can safely remove the
public string $handle
property from your component. - If you've set the
$view
and$theme
property, exchange them withprotected static $VIEW
andprotected static $THEME
.
v3.4.0
What's new
- Added support for the Toggle fieldtype. This is super useful for single checkbox fields like terms and conditions.
What's improved
- Labels and legends are now available for screen readers even if a field has
show_label: false
. This only applies to newly created themes. Feel free to copy-paste the field stubs into your existing themes.
v3.3.0
v3.2.0
v3.1.0
v3.0.0
What's new
- Added support for field conditions. Go nuts!
- Added support for the assets fieldtype.
- Complete refactor introducing a whole bunch of new concepts and customization options like themes, components, hooks, callbacks, and more. Make sure to read the docs.
What's breaking
- Dropped support for PHP 7.4
- Changed the
form
parameter on the component tohandle
. - The component view now defaults to
default
and not the handle of the form anymore. Use theview
parameter on the component to use a different view. - You now need a theme. Run
php please livewire-forms:theme
to create one. - There are lots of breaking changes in the form views. Migrate your old views to the views in the theme you just created.
- There are probably other changes as well. Just make sure to read the docs and follow the instructions. It should be pretty easy to upgrade.