Skip to content

Disregard form screen values from hidden components #86

@nocodeandy

Description

@nocodeandy

Implement a mechanism to automatically disregard or clear values from form fields that have been populated but subsequently hidden via conditional logic before the form is submitted.

Current Problem

Currently, if a user interacts with a conditional section of a form (e.g., filling out "Extension" details) but then changes a previous selection that hides that section, the hidden data remains stored in the form state.

When the form is submitted, this "ghost data" is sent to the service/database. This leads to:

  • Data Integrity Issues: Submissions contain irrelevant or contradictory information.
  • Manual Cleanup: Administrators must manually filter out data that shouldn't technically exist based on the form's logic.

Examples/Scenarios

The "Change of Mind" Scenario: * A user selects "Allow Extensions: Yes."

They fill out three required fields regarding the extension.

They realize they don't need an extension and toggle to "Allow Extensions: No."

Result: The extension fields disappear from the UI, but the service still receives the three populated values upon submission.

Why This Matters

Consistency: It aligns the data behavior with the validation behavior (hidden required fields already don't block submission; hidden data should similarly not be recorded).

Efficiency: Reduces the need for backend "cleaning" scripts or manual data auditing.

Storage Optimization: Prevents the database from being cluttered with unused or "hidden" values.

Suggested UX

The system should treat hidden fields as "null" or "undefined" upon the trigger of a hide action or at the moment of submission.

Logic: If Field_A visibility = False, then Field_A value = Null.

Alternative Implementation: Provide a toggle in the Form Builder settings: "Clear values when hidden" to allow developers to choose this behavior on a per-field or per-form basis.

https://www.loom.com/share/9c6879f6c26d4d6f926bad71561ff2d2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions