Comments (5)
I'm curious what are the ups and downs of putting the
as the main container that wraps all form elements?
The main issue is that, if we wrap all the blocks
types, we'll likely end with <form>
(or a lot of unwanted element types) inside <form>
because we have:
- Collapsible Tabs - which can use external
page
as source of content. And that page may contain a<form>
- Popup, also uses a
page
as source of content. - App Blocks
So we decided to use this form
attribute to link all the required fields to the product form, and creating multiple forms where needed (like product-installments
being a separate form).
As the form blocks can be reordered freely, we can't even choose to have two {% for block in section.blocks %}
loops in the page. So it looks like our only alternatives are wrapping EVERYTHING inside a <form>
, which is an issue because of the things mentioned above, or using the form
parameter :(
from dawn.
One thing to note is that this form
attribute is causing some issues to third party apps, including shop installments, in which the product form doesn't receive change
event because the variant dropdowns are not wrapped in the main <form action="/cart/add">
element. In my reply, I made a test and put the <form>
as the main wrapper of every form elements and everything works fine.
I'm curious what are the ups and downs of putting the <form>
as the main container that wraps all form elements?
from dawn.
cc. @LucasLacerdaUX
from dawn.
What we could do, though, is dispatch a change
event on the form when the variant is changed. If that's what the installments app is listening for.
from dawn.
For the scope of this issue, I've assigned myself to take a look at it. I'm leaning towards using a polyfill to make it work for IE11, even though I really don't want to use a polyfill. I can't think of anything better. 🤔
If the polyfill works outright, it should be pretty low effort.
from dawn.
Related Issues (20)
- [Quick Add Bulk] Add animation when bulk modal opens
- [Cart Drawer] x [Quick Add Bulk] not updating quantity
- [Quick Add Bulk] - P1 Modal UX feedback (Mobile)
- Align on Out of Stock button logic
- Quick add option select updates background pdp instead of quick add modal HOT 1
- [Dawn] 'Click and hover' does not work when variants are selected HOT 1
- [Product] Thumbnails not updating the active media
- [Quick add modal] When switching variant the main page behind the modal scrolls
- [Product] When hiding/removing the quantity selector block, variant switch is broken
- bug in "pick up at store available" - not taking Market / store country into account
- Quick order list is not updated when updating quantity in product form
- [Quick add bulk] for single variant items will throw an error and mess with the cart drawer overlay listener
- Clicking the image on the product page magnifies it significantly.
- [Quick Order List] message `x items added/removed` not showing
- category metafields not available through search & discovery HOT 2
- /cart/change.js don't return Checkout Validation Rule error like /cart/add.js
- [Quick order list] resize error when the header isn't set to be sticky
- Dawn 15 Update rendering incorrect product data in JsonLD schema. HOT 4
- [Footer] Newsletter sign up form, no error message when trying to sign up if you already have a customer record HOT 1
- Predictive search removes special charcters in suggested search terms HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dawn.