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.

Combine totals different forms

  1. Hi there

    I'm creating a series of forms to calculate the costs of different parts of a process (hiring, onboarding, turnover, etc) and I need to be able to combine the calculations of each individual form into a grand total.

    How can I do this?

    Thanks

    Dawson

    Posted 12 years ago on Thursday August 9, 2012 | Permalink
  2. Dawson,

    This is probably possible if your intention is for the user to fill out each form in succession. Is that the case? If it is, you can do calculations on each form and then pass that data to the next form and populate a field dynamically and then use that in the next form's calculation and keep going until the final form, which will show the final total.

    Posted 12 years ago on Thursday August 9, 2012 | Permalink
  3. Hi Rob

    Thanks for this.

    Your assumption is correct.

    Just playing around with the dynamic population as I write this, but am stuck.

    The parameter name I'm using is: turnover_total

    The shortcode for the inserted form is:
    [gravityform id="1" name="Turnover Calculator" field_values='turnover_total=WHAT DO I PUT HERE']

    In the "WHAT DO I PUT HERE" I've tried the value of the field that contains the calculated total (on the same page) and I've tried the post ID.

    Either way, the field value or the post ID keeps appearing on the published page in the field I've created for it.

    I'm doing all of this on a single page, as, ideally, I'm hoping to have all of the individual forms together, but separated by tabs within the page.

    Can I not do it this way? Or would the problem be with the value I'm trying to insert?

    Thanks

    Posted 12 years ago on Thursday August 9, 2012 | Permalink
  4. For the form placements you would not populate anything in the shortcode. You would pass everything via the confirmation url in a query string from form to form.

    I'm not sure you'll be able to pull this off with tabs because of the query strings. Is a "multi-page/step" form out of the question where at the end of each "page/step" you show the running total?

    This would all be one form, but sounds like it would be much easier to pull off as well.

    Posted 12 years ago on Thursday August 9, 2012 | Permalink
  5. Okay, so I just tried this out and it's coming together, thanks to your assistance.

    I'm basically breaking the form apart into sections (e.g., hiring, onboarding, turnover, etc) and am running a "subtotal" calculation at the end of each section for the running total (great idea, by the way) and running a "grand total" calculation at the end.

    It's all working and looks good.

    That said, there are, potentially, quite a few sections I could/would like to add and this could make for an unusually long form.

    Is there any way to enable some form of pagination on the form so that, perhaps, at the bottom of each section, there would be both a subtotal and something like a link/button that says "proceed to the next step?"

    Also, is it possible to insert $ and % into the appropriate input/output fields?

    Posted 12 years ago on Thursday August 9, 2012 | Permalink
  6. Okay, so I guess I should have looked at "page break" because I can see that pagination is part of GF.

    That is awesome, even better than the tabbed idea I was going for.

    And the progress bar is a really nice "bonus."

    Posted 12 years ago on Thursday August 9, 2012 | Permalink
  7. Right on - yeah and that's a much easier solution for you than worrying about chaining multiple forms together!

    Posted 12 years ago on Thursday August 9, 2012 | Permalink
  8. Brilliant - thank you very much for all your help and for leading me to this.

    Just one last thing: is it possible to have $ and % appear in the input and output fields?

    Posted 12 years ago on Thursday August 9, 2012 | Permalink
  9. I know the $ will show if you use product fields for the calculation. I'm not sure if you'd be able to do the % sign though.

    Posted 12 years ago on Thursday August 9, 2012 | Permalink
  10. Thanks, Rob.

    I appreciate all your help today.

    Cheers!

    Posted 12 years ago on Thursday August 9, 2012 | Permalink
  11. No problem, glad to help!

    Posted 12 years ago on Friday August 10, 2012 | Permalink

This topic has been resolved and has been closed to new replies.