Form Help

TOPIC:

How can I add calculations based on a radio button or dropdown list? 1 month 6 days ago #258724

  • Topic Author
  • posurreal
  • Offline
  • Junior Breezer
  • Junior Breezer
  • Posts: 62
  • Thanks: 0
Hi there,

I am working on a Paypal form that has a few options:
0-75 attendees (no extra charge)
75-120 attendees (+$30)
121-150 attendees (+$50)

The base rate is $285. So, it's $285 + whatever they choose.

Is it possible to have the dollar amount calculated and sent to Paypal?

Thanks in advance for your help.
-Mary

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

How can I add calculations based on a radio button or dropdown list? 1 month 6 days ago #258725

  • Mirec's Avatar
  • Mirec
  • Offline
  • Expert Breezer
  • Expert Breezer
  • Posts: 206
  • Karma: 2
  • Thanks: 3
Hello,

if I understand you well, the solution for your question is described in the link below:

crosstec.org/en/forums/3-breezingforms-f...amounts.html?start=0

regards!
Mirko!

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

How can I add calculations based on a radio button or dropdown list? 1 month 5 days ago #258731

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

you can set this values in radio button/or dropdown, whetever you want, put amount in total element (textfield), and send this to paypal.

Is this ok for you?

If yes, I can create a small example for you

Regards,
Tihana

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

Last edit: Post by tihana.krivic.

How can I add calculations based on a radio button or dropdown list? 1 month 5 days ago #258797

  • Topic Author
  • posurreal
  • Offline
  • Junior Breezer
  • Junior Breezer
  • Posts: 62
  • Thanks: 0
Thanks Mirko,

I just spent 1/2 day on it and the calculations are not shown in the total "read only" field.

Perhaps there is a solutions that is from a newer post?

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

How can I add calculations based on a radio button or dropdown list? 1 month 5 days ago #258798

  • Topic Author
  • posurreal
  • Offline
  • Junior Breezer
  • Junior Breezer
  • Posts: 62
  • Thanks: 0
I appreciate your time, Tihana

Here is the checkbox field named kitFilly

1;Up To 75;upto75
0;76-101 (+$30);76-101
0;102-127 (+$60);102-127
0;128-153 (+90);128-153
0;154-179 (+$120);154-179
0;180-205 (+$180-$205);180-205
0;Over 205 (Please call 1-800-560-7472);over205


In the advanced tab, I selected custom actionscript and put in the box:
function ff_upto75_action(element,action)
{
ff_amountowing_action(element,action);
}
function ff_76-101_action(element,action)
{
ff_amountowing_action(element,action);
}
function ff_102-127_action(element,action)
{
ff_amountowing_action(element,action);
}
function ff_128-153_action(element,action)
{
ff_amountowing_action(element,action);
}
function ff_154-179_action(element,action)
{
ff_amountowing_action(element,action);
}
function ff_180-205_action(element,action)
{
ff_amountowing_action(element,action);
}
function ff_over205_action(element,action)
{
ff_amountowing_action(element,action);
}

Note: I did not click "Create Code Framework".


Then I created a text field and named it amountowing
I set it to read only

Here's the custom code I used:

function ff_amountowing_action(element,action)
{
ff_getElementByName('amountowing').value = 0;

if (ff_getElementByName('upto75').checked)
{
ff_getElementByName('amountowing').value =
Number(ff_getElementByName('amountowing').value) + Number(ff_getElementByName('upto75').value);
}

if (ff_getElementByName('76-101').checked)
{
ff_getElementByName('amountowing').value =
Number(ff_getElementByName('amountowing').value) + Number(ff_getElementByName('76-101').value);
}

if (ff_getElementByName('102-127').checked)
{
ff_getElementByName('amountowing').value =
Number(ff_getElementByName('amountowing').value) + Number(ff_getElementByName('102-127').value);
}

if (ff_getElementByName('128-153').checked)
{
ff_getElementByName('amountowing').value =
Number(ff_getElementByName('amountowing').value) + Number(ff_getElementByName('128-153').value);
}

if (ff_getElementByName('154-179').checked)
{
ff_getElementByName('amountowing').value =
Number(ff_getElementByName('amountowing').value) + Number(ff_getElementByName('154-179').value);
}

if (ff_getElementByName('180-205').checked)
{
ff_getElementByName('amountowing').value =
Number(ff_getElementByName('amountowing').value) + Number(ff_getElementByName('180-205').value);
}

if (ff_getElementByName('over205').checked)
{
ff_getElementByName('amountowing').value =
Number(ff_getElementByName('amountowing').value) + Number(ff_getElementByName('over205').value);
}
}


I added Stripe by selecting the Stripe dropdown

Name: fillyStripe
Item Name: FillyKit
Entered test keys
I left the amount blank
Added a URL for the "thank you" page.

I click preview and no calculations are made.

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

How can I add calculations based on a radio button or dropdown list? 1 month 5 days ago #258799

  • Mirec's Avatar
  • Mirec
  • Offline
  • Expert Breezer
  • Expert Breezer
  • Posts: 206
  • Karma: 2
  • Thanks: 3
Hello,

I made one example for you and send it to you in attach a file, I calculated set values in the type of field 'Radio group. On clicking you will be get calculated values in the textfieald 'total'.

Please download->unzip->and install it (BF->Configuration->Package Installer->select this xml file->Install Package).

Select field radio group and Go in Advanced Actionscript and there is code.

If you get stuck, let me know and I will help you!

regards!
Mirko

File Attachment:

File Name: RADIOGRUP.zip
File Size:7 KB
Attachments:

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

Last edit: Post by Mirec.
Moderators: ForumSupport
Time to create page: 0.050 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!