Performing calculations with results
-
I want to perform simple math calculations on the results of the shortcode. Is this possible?
For example, I want to count the number of times a field was selected in all entries. I figured that out with this:
[gravitywp_count formid=’49’ filter_field=’86’ filter_value=”High School Newcomer Cha Cha”]
but now I want to subtract an integer (like 36) from whatever the result/output from the above. So if the shortcode outputs 56, I want to calculate 56-36 and display the result on the screen. I want to do it dynamically since the output from the shortcode will constantly change.
Is this possible? I was hoping it would not require complex Javascript or PHP, since I have almost 50 fields I want to calculate this for in a specific form.
- The topic ‘Performing calculations with results’ is closed to new replies.