Skip to main content
Participant
February 2, 2016
Answered

Complex pricing form - auto calculate formula

  • February 2, 2016
  • 2 replies
  • 576 views

Hello,

I have a pricing form that offers tickets at $350 for the first ticket and $270 for each subsequent ticket. I have set the form up to calculate the number of tickets x the first price but I don't know how to amend the formula to calculate the additional tickets. Does anyone know who I go about this?

Sorry if that's not terribly clear.

Thanks,
Kate

This topic has been closed for replies.
Correct answer try67

Let's say the number of tickets is located in a field called "NumberTickets". You can use this custom calculation script for the total price field

var numTix = Number(this.getField("NumberTickets").value);

if (numTix==0) event.value = 0;

else if (numTix==1) event.value=350;

else event.value = 350+((numTix-1)*270);

2 replies

Participant
February 2, 2016

Thank you sooooo much!! It works perfectly! And thank you for such a quick response - my boss is thrilled!

try67
Community Expert
try67Community ExpertCorrect answer
Community Expert
February 2, 2016

Let's say the number of tickets is located in a field called "NumberTickets". You can use this custom calculation script for the total price field

var numTix = Number(this.getField("NumberTickets").value);

if (numTix==0) event.value = 0;

else if (numTix==1) event.value=350;

else event.value = 350+((numTix-1)*270);