The Toolset Community Forum is closed, for technical support questions, please head on to our Toolset Professional Support (for paid clients), with any pre-sale or admin question please contact us here.
This support ticket is created 6 years, 3 months ago. There's a good chance that you are reading advice that it now obsolete.
This is the community support forum for Types plugin, which is part of Toolset. Toolset is a suite of plugins for developing WordPress sites without writing PHP.
Everyone can read this forum, but only Toolset clients and people who registered for Types community support can post in it.
Hello all,
I need the help/custom work/hint how to set post fields calculation. Egg. I have come custom fields group, and I need calculation of some fields from two fields groups.
If you needs more assistance for it, please duplicate same problem in a test site, and fill below private detail box with login details. also point out the problem page URL, and where I can edit your PHP codes, I need a live website to test and debug. thanks
Languages: English (English )Chinese (Simplified) (简体中文 )
Timezone: Asia/Hong_Kong (GMT+08:00)
Thanks for the details, I have modified below in your website:
1) Modify the post type "Yachts", enable the option "Editor", then we can debug the codes in a single "Yachts" post hidden link
2) modify the post: hidden link
setup a demo code in the content:
Do I need to put this code to every single item or is there a way to add one calculation for all items? Maybe in conditional display?
Question: Is there any way to include calculated result in further calculation?
Languages: English (English )Chinese (Simplified) (简体中文 )
Timezone: Asia/Hong_Kong (GMT+08:00)
Q1) Do I need to put this code to every single item or is there a way to add one calculation for all items? Maybe in conditional display?
It depends on your self, if you need to use same codes for all single item(post), I suggest you setup a content template for those single item(post), and put your custom codes into the content template, then all single item will be able to display it.
see our document:
Content Templates – WordPress Custom Page Template Without PHP https://toolset.com/documentation/user-guides/view-templates/
Q2) Is there any way to include calculated result in further calculation?
Above shortcodes can only display the calculated result in the front-end, it can not store the result into database, and it is a new question, which is different from your original question: https://toolset.com/forums/topic/fields-calculation/#post-459475
And it needs custom codes too.
If the original question is resolved, please create new thread for new question, this will help other users to find the answers. thanks