Jump to content

[bug] 4.6.10 - Commerce List View w/ Required fields

Go to solution Solved by Marc Stridgen,

Recommended Posts

all customizations disabled
default theme

I'm not sure how long this has existed, however I've encountered it while working on an application that adds custom validation to the package form.

Steps to reproduce:

  1. Create a custom text field, set it to Required, and assign it to a package
  2. On the front end, view packages in List View.   This adds a "Choose Options" button
  3. Click Choose Options, do not fill out any fields, and try to add to cart
  4. A new element will be added below the form each time "Add to cart" is clicked, instead of showing that the required field was not filled out
  5. If the field is filled out and add to cart is clicked, all the extra elements disappear and you can proceed to checkout:image.png.0004ec2b769117bb3ef137e9b37fee83.png
  6. Without reloading the page - If you click Continue Shopping, and try to Add to Cart without entering anything in the field, you get this:


If we add some instrumentation to listen in on \IPS\Helpers\Form::values() , we see that the "form_required" error is being added to the element, but is just not displaying correctly via the template:


Validation works great when accessing the package directly (via Grid view), or when updating the purchase form in the client area.  It is only when the form is generated by the 'Choose Options' button that it behaves this way.

Frankly I don't use List view - I've considered just disabling it as an option - but I imagine some customers might prefer it, so please let me know if I can do or add anything to help get this resolved.

Link to comment
Share on other sites

  • 4 months later...
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...