TOPIC:

Re:PayPal calculate amount based on selection 11 years 10 months ago #10556

  • TheMuffinMan's Avatar Topic Author
  • TheMuffinMan
  • Offline
  • Developer
  • Developer
  • Posts: 10064
  • Karma: 167
  • Thanks: 808
Thats why I asked on what "action" you would like to fill the hidden input? On submit I guess?
If yes, then you could put that into the ff_validate_submit function (see "Scripts" library and that validation's details)
The following user(s) said Thank You: wartime

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

Re:PayPal calculate amount based on selection 11 years 10 months ago #10566

  • spencelk's Avatar
  • spencelk
  • Offline
  • Junior Breezer
  • Junior Breezer
  • Posts: 76
  • Thanks: 9
When I enter this code into begin submit:
$this->execPieceByName('ff_InitLib');

function paypalSetAmountValue(){

if (ff_getElementByName('addVenue1').checked) {
  ff_getElementByName("PayPalSelect").value = 'productName|Two(2) Venues plus p&h|469.95|0';
  }
  
else  {
  ff_getElementByName("PayPalSelect").value = 'productName|One(1) Venue plus p&h|244.95|0';
  }
}

I get this error:
Attachments:
The following user(s) said Thank You: wartime

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

Last edit: Post by spencelk.

Re:PayPal calculate amount based on selection 11 years 10 months ago #10586

  • TheMuffinMan's Avatar Topic Author
  • TheMuffinMan
  • Offline
  • Developer
  • Developer
  • Posts: 10064
  • Karma: 167
  • Thanks: 808
remove that first line that says

$this->execPieceByName('ff_InitLib');

It is for pieces, not scripts.
The following user(s) said Thank You: wartime

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

Re:PayPal calculate amount based on selection 11 years 10 months ago #10596

  • spencelk's Avatar
  • spencelk
  • Offline
  • Junior Breezer
  • Junior Breezer
  • Posts: 76
  • Thanks: 9
I tried that still the same error. That is when I added that line hoping it would help. where should I be placing the code? right now it is under submit pieces>>begin submit.
The following user(s) said Thank You: wartime

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

Re:PayPal calculate amount based on selection 11 years 10 months ago #10597

  • TheMuffinMan's Avatar Topic Author
  • TheMuffinMan
  • Offline
  • Developer
  • Developer
  • Posts: 10064
  • Karma: 167
  • Thanks: 808
thats wrong, it should go into Scripts "initialization script" since it is javascript. Pieces are php only.

Then you can use that in your custom validations etc.
The following user(s) said Thank You: wartime

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

Re:PayPal calculate amount based on selection 11 years 10 months ago #10598

  • spencelk's Avatar
  • spencelk
  • Offline
  • Junior Breezer
  • Junior Breezer
  • Posts: 76
  • Thanks: 9
I'm not sure I fully understand. I put the js code in advanced options>scripts>initialization scripts but then also in custom validations?

I have tried putting it in both places as well as each separately. I am no longer getting an error it just doesn't do anything. I also tried placing it within the PayPalSelect intscript that did not work nor did the values of my summary fields display.

I appreciate all of your help with this. I hope we can get this working.
The following user(s) said Thank You: wartime

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

Moderators: ForumSupport
Time to create page: 0.056 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!