If not set, the storage will be initialized when the component gets loaded. With the initialization saved data in the storage will be set to the wrapped form components. This will result in errors if the form components aren't ready yet.
Set the initialization to manual and call the initialization function when all form components are present.
The unique name of the storage.
Disables the storage in a way that it is still doing its thing but does not restore/initialize the values of the form every time the user returns to the form page.
Save a value to the storage.
the type of the form field ('hylo-date', 'hylo-input', 'hylo-textarea', 'hylo-checkbox-group', 'hylo-checkbox', 'file', 'inline', 'select')
the id of the form field
the value of the form field
Saves changes to an inline formset. Needs to be called manually every time a set from the inline formset gets removed. Does NOT need to be called when a new set got added.
You have to gather the values and types of all remaining form components of the inline formset in a storage object: storage["id_of_form_component"] = {type: "form_component_type", value: "form_component_value"}
Possible types are: 'hylo-date', 'hylo-input', 'hylo-textarea', 'hylo-checkbox-group', 'hylo-checkbox', 'file', 'select'
Check the code of this component to see how the values are formatted.
id of the inline formset
the totalForms value of the inline formset
the storage object
Is fired after initialization.
Generated using TypeDoc
Saves form values in the local storage while the user fills out the form. The values are restored every time the user returns to the form page.
Is optimized to work with the hylo-form components set and the Django crispy hylo-form templates.
Wrap the form with this component.
The process of saving the values is automated but functions for saving and loading values are provided.
The clearing of the storage needs to be called manually.