I have a metabox clonable group. I have a field in there named "Price" and I'd like to add a "Total" field like in the image.
I've tried this with custom code, but I can't seem to manage it since its in a query. Does bricks have a calculation possibility?
We can define a custom function that takes a Meta Box group ID, the sub field ID and optionally, the post ID and returns the total of the specified sub field values for all rows for a post (current one by default). Then echo this function in a Basic Text element in the Bricks editor.
Step 1
Set up a cloneable Meta Box group for your post type.
Edit the posts of your post type and populate the field.
Sridhar Katakam is a Bricks enthusiast. He likes helping others by researching and solving WordPress-related problems and building websites.
Get access to all 633 Bricks code tutorials with BricksLabs Pro
Related Tutorials..
Pro
Post Specific Footers in Bricks using Meta Box
This Pro tutorial provides the steps to output post-specific footer using Meta Box' Post type of field when using Bricks. Sample screenshots below. Course CPT…