IGNORE THE FIRST TWO PAGES - GOOD INFO STARTS ON PAGE 3
First, thank you for an incredibly flexible package. It enables us novice developers to add important features like forms to the websites we are working on. The byproduct of this is that we are able to educate ourselves with all the great videos and this forum.
After reading and working on a site's registration form for several weeks, I find it's time to ask for some help.
The form is a little league registration form. We have determined that we want to have enough room for 6 players from one family to register online.
I have successfully been able to build the form and have it gather the data - everything is talking as it should. I have a summary page that shows all of their selections as my page 2. (I can even get excel reports out of the database as I had hoped!)
Here's the wrinkle:
I need a way to calculate the total cost of all players being registered and submit that amount to Paypal (or allow them to submit the form without payment to accept a check via mail). I need to have both options available.
The cost of the program is based on what league they will play in. I currently have a select list where they select their league and a code is transmitted to the database.
Here's a typical select list for this purpose (called pl1_league):
0;Select;
0;COED: T-Ball - (5 & 6 year old boys & girls);Tb
0;BOYS: Mgr Pitch - (7 & 8 year old boys);Mp
0;BOYS: Minors - (9 & 10 year old boys);Mi
0;BOYS: Majors - (11 & 12 year old boys);Ma
0;BOYS: Pony - (13 & 14 year old boys);Po
0;BOYS: Colt - (15 - 17 year old boys);Co
0;GIRLS: Jr.Softball only (6 - 10 year old girls);Jr
0;GIRLS: Jr.Softball & 10u FP (ages 10u - girls);Both
0;GIRLS: 10u FP only (10 & under girls);10u
0;GIRLS: 12u FP (12 & under girls);12u
0;GIRLS: 15u FP (15 & under girls);15u
Here are the corresponding prices (I don't have these integrated into the form anywhere, they are displayed in a jooomla module next to the form):
Tb = $40
Po and Co = $90
All others = $80
To compound matters we offer a $10 discount for multiple registrations (so the first registrant would be at the prices above, but each subsequent registration would be $10 less for each additional registrant). For the select list on players 2-6, I am using different codes to designate that they are the additional registrants (using an underscore on the end of the code, so "Tb" for pl1 becomes "Tb_" for pl2 through pl6, I just don't know how to tie a figure to the codes. I'm guessing the logic would be something like "if pl1_league = Tb, value = 40," etc, but I have no idea how to write this (syntax) or where to put it.
Potentially, I could have 6 amounts that need to be referenced based on selection, added together, displayed on the summary page and submitted to Paypal.
This payment part is the last piece I need to figure out for a Feb 1 launch. Help!
Form is in Quickmode, 1.7.0 build 726