PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Calculation of part-time rates for camp registration

  1. I use GF most often for camp registrations. And while it obviously handles contact details effortlessly, my question is what the best way to calculate a registration fee based on part-time attendance for the camp.

    I don't need it to accept payments, only to calculate what the part-time rate would be depending on which day they arrive, and which day they leave. Then to display this figure to the user, and record the value as part of the user's registration.

    Any suggestions on whether GF can handle this?

    Posted 6 years ago on Tuesday December 18, 2012 | Permalink
  2. If the fee does not need to be shown, just calculated, you can do the math between the two dates, and hook that function to the gform_pre_submission filter, then update a hidden field on your form with that value.

    If you need to do the math and show the total before the form is submitted, you will need to use jQuery or JavaScript on the client side.

    Here is one discussion of doing it with jQuery

    The built in calculations in Gravity Forms do not support date-based calculations.

    Posted 6 years ago on Thursday December 20, 2012 | Permalink