AddToCartPopUpForm errors are not displayed on ajax submit.

Created on 17 May 2023, about 1 year ago

Problem/Motivation

The form is currently using the wrapper ID that comes from the base AddToCartForm. This wrapper ID is rebuilt to be unique on each build and when trying to replace the form on ajax submit, the wrapper ID in the form is stale and the ajax replace command doesn't properly replace the form.

Steps to reproduce

- Add a required field to the add to cart form.
- Trigger the add to cart pop-up form to appear.
- Leave the empty field blank and submit he form.
- The errors are not rendered.

Proposed resolution

Return the form array if errors exist rather than using a replace command so drupal can handle rendering the form and replacing it on ajax submit.

πŸ› Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States ericchew

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

Comments & Activities

Production build 0.69.0 2024