Description
In QField, we have encountered a recurring issue when using fields configured to remember previously entered values. When these fields are hidden in the form, they retain the remembered value instead of resetting to zero or a default value, leading to inconsistencies in the collected data.
Context
When working with forms in QField, we often configure fields to depend on certain conditions, resulting in some fields being hidden based on the data entered in other fields. However, if a hidden field is set to remember previously entered values, it retains the last entered value instead of resetting to zero or a default. This creates problems as it generates incorrect results in calculations and affects data integrity.
Request
We request the implementation of an option to automatically assign a value of zero (or a configurable default) to fields when they are hidden in the form. This should be applied automatically to prevent the carryover of previous values that are no longer relevant for the new record.
Justification
Implementing this feature would help:
Maintain data integrity and accuracy.
Reduce error margins by preventing the use of irrelevant prior values.
Improve user experience in complex forms requiring conditional fields.
Imported from GitHub discussion by @CACG1022 on 2024-11-14T16:25:18Z