Sign Up for OSTraining

Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: How should the calculation for percentages be coded in RSFORM! Pro?

How should the calculation for percentages be coded in RSFORM! Pro? 11 months 3 weeks ago #47171

  • winbornm
  • winbornm's Avatar
  • OFFLINE
  • OSTarter
  • Posts: 10
  • Karma: 0
I am trying to create a form that asks for an annual salary amount and percentage of that amount that should be allocated to a project. My result displays more than two decimal places. How can I round and truncate all but two decimal positions in the result. I have placed the following code in the attribute section of the field being calculated.

onclick="document.getElementById('fed_fnd_req1').value=parseFloat(document.getElementById('ann_sal1').value)*parseFloat(document.getElementById('pct_time1').value/100);"

Thanks for any help.. this is Joomla 2.5.
Please become a member of OSTraining to reply to this post.

How should the calculation for percentages be coded in RSFORM! Pro? 11 months 3 weeks ago #47175

  • edandrea
  • edandrea's Avatar
  • OFFLINE
  • OSTop Dog
  • Posts: 3106
  • Thank you received: 7
  • Karma: 0
I'm sorry, that's a commercial extension and we don't have a copy. Your best bet would be ask the developers of the extension directly. They know their product best.

I notice that they have several script snippets for similar customizations in their documentation. You might look there first. www.rsjoomla.com/support/documentation/v...ipting.html?start=20

Sorry it's a bit beyond or scope. We mainly deal with issues directly relating to Joomla and our courses.

www.ostraining.com/support-faq/

Regrets,
Ed
Please become a member of OSTraining to reply to this post.
  • Page:
  • 1

Sign Up for OSTraining

Open Source Training is not affiliated with or endorsed by the Joomla, WordPress or Drupal projects.
All product names and trademarks are the property of their respective owners.

Copyright 2013 Open Source Training, LLC. All rights reserved.