I’m working on a front-end form that calculates prices, I have a lot of items with a price and everyone has a checkbox for add/remove.
100 : Lights
100 : Brakes
300 : Engine
My problem, as you see, is that if I have two products with the same price only one will be stored.
You know any way to store the price and the product name? like saving the price into another attribute apart from the value?
Nothing simple, it all depends on how you’re storing the items that you want to calculate on. If the only place they are stored is in the field, then no. There isn’t any type of ACF field that allows selections that can hold the same value for more than one of them. I think I answered another similar question
Try something like
100 : 100
100.0 : 100
100.00 : 100
100.000 : 100
the left side should all evaluate to 100 but be considered different values for the array.