Simple calculation with fields

More
12 years 3 weeks ago #31309 by brandonking
Hello,

Could you also consider creating a field that can calculate and display total value from two or more selected fields?

e.g. with new TOTAL field
- backend:
1. parameter for selecting existing fields(can be more than 2) from same type. Maybe, text field or/and select field.
2. parameter for +, -, *, /
3. Use js validation, calculation and save result in TOTAL field.

Regards,

Brandon

Please Log in or Create an account to join the conversation.

More
12 years 3 weeks ago #31313 by ggppdk
we already have an enhancement issue open for this (you can subscribe to it by clicking at the star in front of its title):
Enhancement issue 185 (Calculation Field)

-- also e.g. in item view you could do it in the template:
Code:
<div class='label'><?= $this->fields['myfield1']->label; ?></div> <div class='value'><?= $this->fields['myfield1']->display; ?></div> <div class='label'><?= $this->fields['myfield1']->label; ?></div> <div class='value'><?= $this->fields['myfield2']->display; ?</div> <div class='label'>Total</div> <div class='value'><?php $multiply_result = floatval($this->fields['myfield3']->display) * intval(this->fields['myfield4']->display); echo $multiply_result; ?></div>


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

Please Log in or Create an account to join the conversation.

More
12 years 3 weeks ago #31314 by brandonking
That would be awesome.
Thank you.

Please Log in or Create an account to join the conversation.

More
11 years 5 months ago #38375 by brandonking
What about applying jQuery plugin for this?
www.xsanisty.com/calx/

Please Log in or Create an account to join the conversation.

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.762 seconds
Save
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline