Hi, Lindsay,
Here is what you can do. The assumption is four separate forms; one for each month and the final one that lists out the totals of the others with a grand total (this form is the one submitted to PayPal).
Create your form for March and have a Total field on it. Setup the Confirmation to be a Redirect to the URL for your second form (April) and click the checkbox for "Pass Field Data Via Query String". Select the merge tag for your Total field and name your parameter using the month so you will have something like march_total={Total:1}. This will pass along the total from Form 1 to Form 2.
Create your Form 2 for April and have a hidden field that will be populated with the total from Form 1. On this hidden field you will go to its Advanced tab and select "Allow field to be populated dynamically" and enter the Parameter Name from the querystring (march_total). This way you have the total from the first form carried over.
For Form 2, you will setup your confirmation to be a redirect to the URL for your third form (May). You will again click the checkbox for "Pass Field Data Via Query String". This time you will insert the merge tag for your hidden total field for March's total AND then the merge tag for your current form's total (April). So you would have something similar to march_total={March Hidden Total:28}&april_total={Total:5}. These totals will then be passed along to your third form (May).
For Form 3 (May), you will add two hidden fields that will be populated with the totals from the first two forms. On these hidden fields, you will again go to the Advanced tab and select "Allow field to be populated dynamically" and enter the Parameter Name from the querystring. The Parameter Name will be "march_total" for one of the hidden fields and "april_total" for the other. You will again setup your confirmation with the appropriate merge tags to pass along the totals to the fourth form.
For Form 4 (final listing of totals), you will now have the totals from the other forms available for use to modify the total passed along to PayPal. For this form you can use the "gform_product_info" hook (http://www.gravityhelp.com/documentation/page/Gform_product_info). You can use this to add your products for March, April, and May with their totals. You can also use the "gform_product_total" hook to populate the total field with the combined totals for each of the months (http://www.gravityhelp.com/documentation/page/Gform_product_total)
This article may also help you out: http://www.gravityhelp.com/documentation/page/Gravity_Forms_Pricing:_Adding_Tax
Take a look and let me know if you have questions. I know it is a lot of info at once. :)
Posted 12 years ago on Wednesday February 22, 2012 |
Permalink