Prevent form validation when using Previous button?

Created on 25 August 2023, 10 months ago
Updated 30 August 2023, 10 months ago

Problem/Motivation

When using the Previous button to move back in the form steps, fields marked as required are validated.
This prevents a user from moving backwards in the form if they do not provide values for the fields on the current step.

Steps to reproduce

  1. Add steps to a form display as per module documentation.
  2. Set a field on a later step in the form to required.
  3. Attempt to use the Previous button. The required field will set a form error.

Proposed resolution

Somehow allow for users to move backwards in the form using the Previous button even if required fields on the current step are not complete.

I'm not sure how this might be accomplished. I've tried setting limit_validation_errors in a form alter to a few places and it doesn't seem to take. Would something like this even be possible?

✨ Feature request
Status

Fixed

Version

1.1

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States jimmynash

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.69.0 2024