I have a ecommerce checkout page with a form that ...
# cfml-general
d
I have a ecommerce checkout page with a form that allows the user increase or decrease the Quantity of their products on the checkout page. I then BIND (using <cfinput bind=...>) two other form fields (Shipping_Cost and Total_Amount) to the user's changing of the Quantity field, so that the shipping and total can automatically recalculate. My problem is, since both Shipping_Cost and Total_Amount form fields are binding to the same Quantity form field, the order they bind in becomes important. The Shipping bind needs to execute and recalculate before the Total bind does. Currently, both binds work perfectly, but Total_Amount updates before Shipping_Cost randomly. Is there any way to control the order in which form fields bind in ColdFusion?
g
It’s better to use jquery and use sunscreen await to fix it Instead of relying on coin put bind
They might work but most of the time they will fail Do not use cfinput anymore
d
Thank you so much. Agreed on not using cfinput. I searched Google for "jquery sunscreen await" and didn't find anything. Can you show me where to find this alternative for cfinput binding? I am very much interested in finding the modern approach to solving this problem.