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.
Dynamically Displaying Connected Content Offer Images in Bricks using Meta Box Relationship
Consider the following scenario from a recent project I worked on. CPT 1: project CPT 2: content-offer Taxonomy for Projects: remodel-typeSample term names: Backyard Cottages…
Dynamic Post-specific Templates in Bricks using Meta Box/ACF Select Field
Update on 23 Aug 2023: Added steps for ACF. Bricks builder v1.8.4 introduced an pretty useful filter called bricks/active_templates that flew under the radar. This…