Number Field Summation in ACF
-
Hello Sir,
I wash clothes. I want people to fill a form where they list the types of clothes, and the quantity per type, that they want me to come pick up.
For example: 2 Shirts, 1 Jacket, 1 Trouser. That’s 3 items, and 4 Quantity.
So, when I go pick up the clothes, there’s a record that I received 3 items and 4 Quantity.
This simple thing, is what I want Advanced Custom Fields to do for me.
THINGS TO NOTE
1.) I’m not calculating price of anything. Just Total number of items delivered to me.This means there’s no need for price variable.2.) I can’t tell how many things the customer might want to give me. So Repeater Fields in ACF was the best way to go about it–
because with Repeater Fields, the customer can continue to duplicate and duplicate and duplicate the fields to as many times as they want.Now, I’ve achieved it to this point. These are my Field Groups:
1.) Item Type: Select
2.) Featured Image: Image
3.) Quantity: Number
4.) Description: Text AreaWhat’s left now, is how to ensure that all the Quantities from the Number Field that the user will fill in,should output a total.
Meaning that, a Total output should be instantly generated from all the instant addition of all the number fields that are on the form, which the user fills in.
SAMPLE
Repeater Field 1: Number=2
Repeater Field 2: Number=1
Repeater Field 3: Number=1TOTAL= 4
So, there should be a new field called “TOTAL” that acts like a Summary Field under all the other fields. And what it should do, is to display the Total of everything entered in all the Quantity(number) Fields of the Form.
How can I achieve the ability to do the instant summation of all the number fields, is where I am stuck.
Waiting to hear from you soon.
RegardsThe page I need help with: [log in to see the link]
- The topic ‘Number Field Summation in ACF’ is closed to new replies.