## Changes - 2.2.4 * Fix #266: Timing issue in widgets `DateField` and `DateTimeField`. Input focus switched before processing user input in Firefox and Safari browsers. * Better handling of methods `clean_content` in RichtextArea and its dialog forms. * Fix: Richtext rendering for text nodes with multiple marks now handled properly. * Fix: In forms Meta classes using `fields_map`, the initial value is ignored. - 2.2.3 * Widgets `DateRangePicker`, `DateRangeTextbox`, `DateRangeCalendar`, `DateTimeRangePicker`, `DateTimeRangeTextbox` and `DateTimeRangeCalendar` now mimick the disabled properly if the underlying input field is disabled. * Fix #251: In `FileUploadWidget`, accept MIME-type is now checked on the client side before upoading a file. * Fix: Use proper renderer for widget `TelInput` introduced in Django-6.0. * Fix #256: Set position for widget `PhoneNumberInput` if used with a default country. * Fix: Open international selector for widget `PhoneNumberInput` if used without a default country and user starts typing. * Fix: In `Selectize` widget, when using `filter_by`, an empty filter value is now properly ignored when loading options lazily. - 2.2.2 * Fix in `StepperCollection`: Do not check the validity of transient forms. * Fix in `PhoneNumberField`: If field is empty, it now validates unless required. - 2.2.1 * Decativate all decorators `@allowedAction`, as they only work locally but not on https://django-formset.fly.dev/ * Fix in `PhoneNumberField`: If field is not required and remains empty, it validates. - 2.2 * Improve: Handle detached buttons separately when rendering form collections. This allows the use of detached buttons inside collections with siblings. * **Pending breaking change**: In classes inheriting from a `FormCollection` with siblings, the attribute `add_label` is deprecated in favor of `induce_add_sibling` and its corresponding activator field. This gives developers the freedom where to place and how to style the buttons used to add siblings. * **Pending breaking change**: In classes inheriting from a `FormCollection` with siblings, method `retrieve_instance` is replaced against `get_or_create_instance`. The latter now also returns a Boolean value when an instance was created which is stored as `created` inside the valid holders of a collection. This allows developers to distinguish between existing instances and newly created ones, when preparing the response. * Each time a formset is submitted, an `extra_data` object is added to the request payload. This can be used to pass arbitrary data to the submission. If partial submissions are used, the new button action `setExtraData` can be used to add response data to this object. * Feat: Add attribute `reverse_accessor` on FormCollection. This allows developers to specify the reverse accessor name of a `ForeignKey` relation used in collections. * Fix: Detached buttons use the prefixed path for name attributes. * Fix: The backend implementation of the `RichtextArea` widget now validates the length of submitted text ignoring all HTML tags. This emulates the behaviour of its frontend counterpart. * If any of the forms to be submitted partially does not validate, then report that form and do not send any data to the server. This action can be bypassed by setting `force-submission`. * Add hook, so that dialogs and stepper-steps are forced to become visible when reporting the validity and their forms contain invalid fields. * Fix: Widgets observing an `UploadedFileInput` now handle attributes `df-require`, `df-disable`, `df-show` and `df-hide` as expected. * Feat: Button action `setFieldValue()` now can update a complete datastructure of field values inside `formset_data`. Until version 2.1 it only was possible to update scalar values. * Fix: The `Selectize` widget now correctly pilfers the height of its original widget, even if style attribute is set `height: auto;`. * The initial values specified in an `Activator` field now is rendered as `value="…"` inside its associated `Button` widget. * Fix #244: Multiple widgets of type `RichtextArea` can use the same dialog form inheriting from `RichtextDialogForm`. * Add support for Django-6.0 and drop support for Django-5.0. * Adopt the styling of the file upload widget, it now responds to dragging events. - 2.1.4 * Fix: In `StepperCollection` only immediate children are considered as `StepperSteps`. This caused problems when nesting collections. * Fix race condition during initialization of `RichtextArea` widget: This web component might already have been initialized, before `FieldGroup` was constructed. * Improve readablility: Use emdash in Date(Time)Range widget to separate from – until datetimes. * Fix rare problem when dragging a sortable collection. * Improve UX: Set background-color for smoother dragging of a `FormCollection`. * Fix: Accept Date(Time)Range objects delivered by Postgres in associated widgets. * Improve UX: When sorting form collections, the trash symbol now is hidden to prevent confusion. * Fix: add extra check to see if instance marked for removal has already been deleted. * Improve UX: Make disabled `Selectize` widgets better distinguishable by applying opacity to the whole widget. * Fix regression from 2.1.3: Hover in Calendar over prev and next button highlights until start or begin of calendar sheet, even in non-range mode. - 2.1.3 * The `Selectize` widget never renders the `empty_label` provided by the field. Instead, the user can remove the selected option, unless the field is marked as required. * Refactor conversion of initial value into string from fields `DateRangeField`, `DateTimeRangeField` to widgets `DateRangePicker`, `DateRangeTextbox`, `DateRangeCalendar`, `DateTimeRangePicker`, `DateTimeRangeTextbox` and `DateTimeRangeCalendar`. * Consistently align placeholder in `SelectizeMultiple` widget with that of the `Selectize` widget. * In `DjangoFormset.ts`, use `location.assign()` instead of assigning value directly to `location.href`. * Fix #214: `list_filter` in `ModelAdmin` now keeps querystring when switching from detail view to list view. - 2.1.2 * In `ModelAdminMixin`, after validating a form, method `save_model` is called to save the object. This maintains compatibility with the default `ModelAdmin` implementation. * Fix #236: `maxLength` in slug field is not ignored when typing into the observed field. * Fix: Server side code of widget `RichtextArea` now properly re-validates the length of the submitted rich text. * Fix #239: `DateRangePicker` and `DateTimeRangePicker` did not correct the local timezone offset during string generation. - 2.1.1 * Fix #232: In `SelectizeWidget`, when scrolling beyond `max_prefetch_choices`, although options with sublabel and itemlabel are added, the options are not rendered properly. * Fix #224: Conditional attributes in widgets referring to fields in a `Fieldset` did not work. * When using the `df-show`, `df-hide`, `df-disable` or `df-require` attributes with a relative path to another field, this path now is evaluated using the current field's `name`. This should fix some problems when using a relative path. * `DecimalUnitInput` now also works on Chrome for Android. - 2.1 * Add special widget `DecimalUnitInput`. It can be used for decimal values with a unit, such as money, length, etc. * Options in the `Selectize` and `SelectizeMultiple` widgets can now render sublabels below their main labels. This is useful to display additional information about the option. * Add utility functions `get_related_object` and `get_related_queryset` to deserialize foreign key and many-to-many relationships from `JSONField`s. * Flags in `PhoneNumberInput`, `CountrySelectize` and `CountrySelectizeMultiple` are now loaded as a PNG-sprite rather than through individual SVG-files. Therefore there is no need to `npm install flag-icons` anymore. * Fix: Setting the value of the HTML field used for `PhoneNumberInput`, now works as exected. * Widget `RichtextArea` accepts the extra option `richtext-bidirectional` for mapping between dialog forms and editor state. The behaviour of `richtext-map-to` and `richtext-map-from` changed slightly. Read the documentation on how to use it. * Fix: Handle widget attribute `df-require` as intended. * Fix: Regressions by allowing empty label in `Selectize` widget. * Fix: Fields using a filter are always considered as incomplete. * Fix: django-formset's `ModelAdmin.get_model()` allows to override the model form. * In `Selectize` and `SelectizeMultiple`, hide search input field, if number of options is <25. - 2.0.1 * Fix regression introduced in 2.0: Attribute `filter_by` in widgets `Selectize`, `SelectizeMultiple` and `DualSelector` did not trigger a reload if observer field changed. * Prevent double loading of options in widgets `Selectize`, `SelectizeMultiple` and `DualSelector`. - 2.0 * **Main feature of this release:** It now is possible to use a **django-formset** aware `ModelForm` or `FormCollection` inside the Django-Admin. Read the [documentation](https://django-formset.fly.dev/admin-integration/) on how to use this feature. * A **django-formset** aware `ModelForm` can use the attribute `fields_map` in its `Meta` class. This allows to map fields from a `Fieldset` to any arbitrary model field. It also allows to map multiple form fields into a `JSONField` offered by the model. * A **django-formset** aware `ModelForm` can use the new `CollectionField` in combination with the just mentioned `fields_map`. This allows to store the complete content of a form collection inside JSON. * **Breaking Change:** The `Fieldset` class is a standalone entity to group multiple input fields into a ``
``-element. It is not a subclass of Django's `Form` class anymore. Read the [documentation](https://django-formset.fly.dev/fieldsets/) on how to use it. * **Breaking Change:** The `FormMixin` class has been moved from `formset.utils` to `formset.forms`. There are two new classes `formset.forms.Form` and `formset.forms.ModelForm` which shall be used as base classes for forms and model forms. * **Breaking Change:** The form field class `formset.richtext.fields.RichTextField` has been moved from `formset.richtext.fields` to `formset.formfields.richtext`. The model field class `formset.richtext.fields.RichTextField` has been moved from `formset.richtext.models.fields` to `formset.modelfields`. The widget class `formset.richtext.widgets.RichTextArea` has been moved from `formset.richtext.widgets` to `formset.widgets`. This change was made to create a consistent naming convention across all widgets, form- and model fields. * **Breaking Change:** The classes `DateRangeField` and `DateTimeRangeField` have been moved from `formset.ranges` to `formset.formfields`. The classes `DateRangeCalendar`, `DateRangeTextbox`, `DateRangePicker`, `DateTimeRangeCalendar`, `DateTimeRangeTextbox` and `DateTimeRangePicker` have been moved from `formset.ranges` to `formset.widgets`. * **Drop support for Django-4.2**. * Semantically improve HTML: The `
`-element to wrap forms now is rendered as `
`. * The `Selectize` widget now uses a search box inside the dropdown instead of a search box inside the selection area. * The `Selectize` widget now scrolls infinite, i.e., it loads the remaining options from the server when scolling to the end of the listbox. * Error messages shown for invalid fields hide as soon as the field is focused. This is to prevent the user from being unsettled by an error message while filling out the form. * In input fields, show the success tick for validated fields after blurring and not while typing, for the same reason as above. * After submitting a form containing the field `RichTextField`, the uploaded image is copied from the temporary upload folder into its final destination. * Add management command `./manage.py cleanup_files` to delete dangling files. This is because the `UploadedFileInput` widget accepts files before their form is submitted and hence processed. * Fix: Border of Richtext Area and Selectize widgets now has the same (green) feedback border as other input fields on blur after entering a valid value. * Fix: Calendar widget inside a form collection was not rendered properly. * Fix: Selectize widget had alignment problems with its lookup field. * Fix: Placement of dialog for phone number and date picker now also considers left offset. - 1.7.8 * Fix #236: `maxLength` in slug field has been ignored. If set, `DjangoSlugElement` now truncates this string. - 1.7.7 * Add support for Django-5.2. - 1.7.6 * Fix #209: Induce button now also work for fresh form collections. - 1.7.5 * Fix #208: Closed form dialogs are always considered as valid. * Fix in web component ``date-picker`` and ``date-time-picker``: On submission the timezone offset now is removed, this sometimes caused the submission of incorrect date/time stamps. - 1.7.4 * Fix #80: Allow to use `django_filters.FilterSet` on filtered widgets. - 1.7.3 * Fix: Adopt signature of `clean()` method to Django's clean form. * Fix #196: Temporarily disable Calendar while fetching new sheet. - 1.7.2 * Fix: Aggregate data before submitting untouched form collections. * Fix: Dispatch `Event('invalid')` for invalid fields only if form validation didn't do it during validation. - 1.7.1 * Stepper was not invalidated if invalid data was filled into previous form. * Richtext Area (fix #198): Styles of separator in menubar of RichtextArea were not aligned properly. * Richtext Area: Fix scoping problem with nested Richtext editors. * Richtext Area: Make scrollbar appear in contenteditable only. * Richtext Area: Upgrade to TipTap version 2.11.5. * Richtext Area (fix #191): Do not blur wrapper element if clicked element is part of it. - 1.7 * Main feature of this release: Add component ``StepperCollection`` allowing to fill out forms step by step. * Fix #192: In `RichtextArea`, the border was not rendered showing invalid state, if this field remained untouched with the form being submitted. - 1.6.1 * Fix: `DatePicker` and `DateCalendar` sometimes had an offset of one day, if timezone caused a shift after midnight. * Fix: Adding `` now also causes a color adjustment for widgets. * Improve styling of the dropbox in `FileUploadWidget`. * Prevent flickering of submenus in `RichtextArea` during initialization. - 1.6 * Main feature of this release: Full support for dark mode. * Add support for Django-5.1. * Always apply 6 rows to the calendar widget to prevent resizing when paginating. * To `RichtextArea` widget, add control elements to select font family, font size and line spacing. * Fix: Only find direct dialog element for a menu button. This caused problems when nesting multiple richtext areas. * Fix: `Selectize` widget did not apply proper styles if group elements are nested. * Fix: `FormDialog` loaded main stylesheet unnecessarily * Fix: `RichtextArea` now limits the width of sub-dialogs to main textarea. * Feature: In `RichtextArea` menu items can be grouped in menubar to wrap consistently. * Feature: In `RichtextArea` add class-based Node- and Mark control-elements. * The build target has been renamed from `esbuild` to `esbuild.modular`. - 1.5.6 * Fix: In `RichtextArea`, wait until the web component is completely initialized before validating its content. - 1.5.5 * Fix: Regression in `FileUploadWidget`, drag and drop of file into drag area does not work. - 1.5.4 * yanked - 1.5.3 * Fix: Regression in `RichtextArea`, heading with a single level does not work. - 1.5.2 * Fix naming issue in interactive docs, preventing the dialog not to close. * Fix in RichtextArea: Dropdown menu did not show up at the right position. - 1.5.1 * The published version of **django-formset** now also includes the monolithic build of all JavaScript files. * In RichtextArea: Add control element to select font family. * Date- and DateTime-widgets as Calendar representation now always apply 6 rows to prevent widget resizing when paginating. * Fixing RichtextArea: Only find direct dialog element for a menu button. * Fixing Selectize widget: Apply proper styles if group elements are nested. Happened when using the widget in a RichtextArea's dialog. * Fixed: Main stylesheet sometimes was loaded more than once. - 1.5 * **Breaking Change:** Always include `` to the ``-section of an HTML template. This is because `gettext` is used inside many JavaScript files. * Drop support for Django-4.1 and Python-3.9. * Add support for Python-3.12. * Fix #142: A `FormCollection` with siblings and multiple `RichtextArea` widgets did not work. * Fix #140: Adding `default_renderer` to `FormCollection` did not always have the intended effect. * Fix #138: Selectize widget in sortable collection raises JavaScript error. * Fix monolithic build. * Attribute `