TOPIC:

calculations with text fields and averages 2 weeks 4 days ago #252472

  • Topic Author
  • Luisserafim
  • Offline
  • Expert Breezer
  • Expert Breezer
  • Posts: 160
  • Thanks: 0
Hello! happy 2021 :)

I intend to do calculations with text fields and other calculations with the results to be presented in other fields including averages of the results.

can I do 2 functions in the same field? example:

make a sum of 10 fields and display in one field and then divide by 12 and show in another field.

Thanks in advance

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

calculations with text fields and averages 2 weeks 4 days ago #252474

  • tihana.krivic's Avatar
  • tihana.krivic
  • Offline
  • Moderator
  • Moderator
  • Posts: 3038
  • Karma: 3
  • Thanks: 260
Hi,

Happy New Year too :)

you can do the sum of 10 textfields, and show result in one field.
Then on another field you can do the divide with 12 and show on it.
(You want to divide with 12 sum of 10 fields, and show on another field).
If yes, I can create a small example for you, I just want to be sure that you want this :)

Regards,
Tihana
The following user(s) said Thank You: Luisserafim

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

Last edit: Post by tihana.krivic.

calculations with text fields and averages 2 weeks 4 days ago #252475

  • Topic Author
  • Luisserafim
  • Offline
  • Expert Breezer
  • Expert Breezer
  • Posts: 160
  • Thanks: 0
Hi Tihana!

Yes please.

I have the result in "dcrai" Field:

function ff_dcrai_action(element, action)
{
ff_getElementByName('dcrai').value = 0;
{
ff_getElementByName('dcrai').value =
Number(ff_getElementByName('rendimentoanualiliquido51').value) +
Number(ff_getElementByName('rai52').value) +
Number(ff_getElementByName('rai53').value) +
Number(ff_getElementByName('rai54').value) +
Number(ff_getElementByName('rai55').value) +
Number(ff_getElementByName('rai56').value) +
Number(ff_getElementByName('rai57').value) +
Number(ff_getElementByName('rai58').value) +
Number(ff_getElementByName('rai59').value);
}
}
// ff_dcrai_action

This is done.

Now i want the result /12 in other field. "dcrai/12"

Regards

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

Last edit: Post by Luisserafim.

calculations with text fields and averages 2 weeks 4 days ago #252479

  • tihana.krivic's Avatar
  • tihana.krivic
  • Offline
  • Moderator
  • Moderator
  • Posts: 3038
  • Karma: 3
  • Thanks: 260
Hi,

here is an example.

File Attachment:

File Name: totaldiv.zip
File Size:13 KB

The code is located in each fields->Advanced->Actionscript

If you need more help, please let me know

Regards,
Tihana
Attachments:
The following user(s) said Thank You: Luisserafim

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

calculations with text fields and averages 2 weeks 4 days ago #252485

  • Topic Author
  • Luisserafim
  • Offline
  • Expert Breezer
  • Expert Breezer
  • Posts: 160
  • Thanks: 0
It's Alive!

Thanx Tihana! U R The Best :)

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

calculations with text fields and averages 2 weeks 2 days ago #252610

  • Topic Author
  • Luisserafim
  • Offline
  • Expert Breezer
  • Expert Breezer
  • Posts: 160
  • Thanks: 0
Hi!

since the results are in euros € how can I force:
1. the field must be in the form xxx,xx €
2. the result of the calculations in the same way xxxxxxxx,xx €

Thanks in advance

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

Time to create page: 0.052 seconds

BreezingForms Pro 1.4.7 for WordPress Released!

Available in the membership section.

September Discount!

Massive discounts on all subscriptions!

Get Your Subscription Here

Quick Links

Downloads

BreezingForms

ContentBuilder

BreezingCommerce

Templates

Documentation

BreezingForms

ContentBuilder

BreezingCommerce

Apprendre BreezingForms (French Community)

Apprendre et maîtriser BreezingForms par des tutoriels et exemples, le tout en français

breezingforms.eddy-vh.com

Questions et réponses sur les forums de l'AFUJ

AFUJ

Special Offer

Summer Sale! All subscriptions at a special price!

Includes prio support, all of our current and future Joomla!® extensions and Joomla!® templates for the duration of your membership.

Get it from here

3rd Party Discount - 25% Off

We help you to keep your costs under control. If you are a new member and purchased a form building tool from a different form vendor, then you'll get a 25% discount on our subscription plans.

How to receive the discount:

Send us a quick email to sales@crosstec.org with a proof of purchase (for example a paypal receipt), await payment instructions and enjoy your membership!