Skip to content

5.5.6 Editing & Reset Form #168

@andrei-manda

Description

@andrei-manda

User Story

As a user, I want to be able to edit a form so that I can modify answers if needed.

Description

The system must provide functionality for users to edit or reset individual questions within a form, and reset the entire form to its initial state.

Preconditions

  • User is logged in and is on Form Details page.
  • There must be a form with a status anything but "Not Started".

Main Flow 1 (reset form)

  1. User clicks on the kebab menu located in the upper right corner.
  2. The system displays a bottom sheet.
  3. From the bottom sheet menu, the user selects the "Clear form (delete all answers)" button.
  4. The system prompts the user with a confirmation modal to ensure the action.
  5. User clicks the "Clear form" button.
  6. After confirmation:
    - the system displays a successful message.
    - the system resets the form status to "Not Started" and all associated questions to "Not Answered".
    - all notes, photos, and videos associated with the respective form are deleted

Alternative Flow (clear answer)

  1. The user navigates to the Questions List and selects a specific question.
  2. Within the question view, the user clicks on the "Clear answer" button.
  3. The system prompts the user with a confirmation modal
  4. User selects the "Clear answer" button within the modal.
  5. The system resets the selected question, setting its status to "Not Answered" and deleted all its media files.

Main Flow 2 (editing question)

  1. The user navigates to the Questions List and selects a specific question.
  2. Within the question view, the user modifies their answer.
  3. After modifying the answer, the user selects the "Save and continue" button.
  4. The system saves the new answer and redirects the user to the next question.

Business Rules

  1. The "Clear form (delete all answers)" option must be disabled for forms with a status of "Not Started".
  2. Clearing a form removes all associated media and resets the form status to "Not Started," with all questions set to "Not Answered."
  3. Clearing an individual question removes its associated media and sets the question status to "Not Answered."

Acceptance Criteria

  • The confirmation modal is shown for both clearing the entire form and clearing individual answers.

Additional Information

  • Figma references
    • Clear Form Modal: here
    • Clear Question Modal: here

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions