TOPIC:

Berechnung/calculating von select-list 3 years 8 months ago #181088

  • Topic Author
  • d4s_m4v3r
  • Offline
  • Fresh Breezer
  • Fresh Breezer
  • Posts: 2
  • Thanks: 0
Hallo,

wir benutzen folgendes Skript für die Berechnung von Feldern: crosstec.org/en/support/online-documenta...ting-textfields.html

ist es möglich innerhalb des Skripts eine If Schleife zu verwenden?

Beispiel: Wir möchten folgendes berechnen.

Select Liste 1: 1 Jahr 5%, 2 Jahre 10%
Textbox 1: Eingabe von Zahl

Je nachdem welche Auswahl getroffen wurde soll Textbox 1 zuerst die Prozentzahl abziehen und danach durch die entsprechende Monats Zahl teilen.

Vielen Dank
_____________________________________________________________

Hello,

we are using the following script to calculate: crosstec.org/en/support/online-documenta...ting-textfields.html

is it possible to place an if statement?

For example:

Select list 1: 1 year 5%, 2 years 10%
Textbox 1: input of number

Depending on which selection was made to text box 1 first deduct the percentage and then divide by the corresponding month number.

Best regards

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

Berechnung/calculating von select-list 3 years 8 months ago #181093

  • lovre's Avatar
  • lovre
  • Offline
  • User is blocked
  • User is blocked
  • Posts: 2667
  • Karma: 76
  • Thanks: 329
Hi,

can you please send us your form so we can work on it, it's easier that way. Follow these steps to create a Form Pacakge:
crosstec.org/en/support/online-documenta...ted/94-packages.html

Zip it (.zip) and attach here.
Support Crosstec and get ALL EXTENSIONS and professional support for just $5
Here!
===========================================
Need to renew Pro Support?
Buy Here!
===========================================
Satisfied?
Consider a membership!
===========================================
Like us on Facebook
===========================================

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

Berechnung/calculating von select-list 3 years 8 months ago #181097

  • Topic Author
  • d4s_m4v3r
  • Offline
  • Fresh Breezer
  • Fresh Breezer
  • Posts: 2
  • Thanks: 0
Thanks for your support!
Attachments:

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

Berechnung/calculating von select-list 3 years 8 months ago #181108

  • lovre's Avatar
  • lovre
  • Offline
  • User is blocked
  • User is blocked
  • Posts: 2667
  • Karma: 76
  • Thanks: 329
Hi,

I'm sending you your form back in a package. We have removed the actionscript from the "total" field and made an initialization script (Form> Advanced> More Options> Scripts> Initialization Scriopt> Custom) like this:
function ff_miete_init()
{
setInterval(function() {
var months = ''
if (jQuery('[name="ff_nm_rabatt[]"]:checked').val() == '5')
{months='12'}
else if (jQuery('[name="ff_nm_rabatt[]"]:checked').val() == '10')
{months='24'}
else if (jQuery('[name="ff_nm_rabatt[]"]:checked').val() == '20')
{months='36'}
else if (jQuery('[name="ff_nm_rabatt[]"]:checked').val() == '30')
{months='48'}

ff_getElementByName('total').value =
(Number(jQuery('[name="ff_nm_wartungsvertrag[]"]:checked').val()) - 
(Number(jQuery('[name="ff_nm_wartungsvertrag[]"]:checked').val()) * 
Number(jQuery('[name="ff_nm_rabatt[]"]:checked').val()/100))) / 
Number(months);
}, 500);
} // ff_miete_init

Please test the form and let us know if the calculation is done right. If not please provide us with a simple math formula on how to calculate the total field.
Support Crosstec and get ALL EXTENSIONS and professional support for just $5
Here!
===========================================
Need to renew Pro Support?
Buy Here!
===========================================
Satisfied?
Consider a membership!
===========================================
Like us on Facebook
===========================================
Attachments:

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

  • Page:
  • 1
Moderators: ForumSupport
Time to create page: 0.049 seconds

July Sale!

Discounts for all of our extensions + support. Ending July 31st!

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!