TOPIC:

calculations with text fields and averages 1 month 1 week ago #253181

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

oh, I forgot on this.
I added this part of code in each element and now it is ok:
if(isNaN(result1)) {
return '';
}
Here is fixed example:

File Attachment:

File Name: example221_fixed.zip
File Size:14 KB


Regards,
Tihana
Attachments:

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

calculations with text fields and averages 1 month 1 week ago #253183

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

Lets leave the comma problem for later, please.

What I realy want now is the two decimal places and this fiels is returning a lot of them.

Please help

Best regards
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_getElementByName('dcrmi').value=ff_getElementByName('dcrai').value/12;
var result00=ff_getElementByName('dcrai').value;
var result01=result00.toFixed(2);

ff_getElementByName('dcrai').value=result01;
}
// ff_dcrai_action

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

Last edit: Post by Luisserafim.

calculations with text fields and averages 1 month 1 week ago #253185

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

could you please send me your form to my email that I can fix this?
At first the code seems ok, but it is better that I can check it on the form

Regards,
Tihana

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

Time to create page: 0.048 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!