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.

Performing calculations

  1. Hi,

    I wonder whether the following would be possible with Gravity Forms:
    For a customer I have to make a form with many questions. Users of the website give some data of their income and costs and the form will calculate whether and how much tax you can get back.

    Would it be possible to make the form with Gravity Forms and add the extensive calculations for this? Or is this too much?

    Thanks!

    Joost

    Posted 12 years ago on Wednesday December 28, 2011 | Permalink
  2. Calculations for general use are not currently a built in feature of Gravity Forms. The only calculations that are currently available in Gravity Forms are the calculations built into the Pricing Fields used to dynamically calculate the Total when using the Total Field.

    It is possible to implement this as a customization, but it would require writing the necessary code to handle the calculation using jQuery. I could refer you to a developer if this is something you wanted to pay a developer to implement for you.

    The good news is calculations is a feature we will be adding to Gravity Forms in the new year. We hope to introduce it sometime in the first quarter.

    Posted 12 years ago on Wednesday December 28, 2011 | Permalink
  3. Carl,

    Can you point me in a direction with respect to getting started on my jQuery coding? Is there a primer somewhere I can follow? Thanks.

    emilio

    Posted 12 years ago on Thursday January 5, 2012 | Permalink
  4. I would like to do some simple on screen calculations on a form that will be used to generate an estimate for a customer who registers on my site.

    When will the calculation functions be available and will they use Ajax or some other feature that will run a "calculation" BEFORE the customer submits the form for a formal estimate to be drawn up and emailed in QuickBooks. ( done manually ).

    Any ETA on the calculations features for near-real time product pricing subtotals for example??

    Thanks / John

    Posted 12 years ago on Tuesday April 10, 2012 | Permalink
  5. Our new GF v1.6.4 Beta 1 was released today with calculations - see if that works for what you are trying to do:

    http://www.gravityhelp.com/gravity-forms-v1-6-4-beta-1-released/

    Posted 12 years ago on Wednesday April 11, 2012 | Permalink
  6. Rob --- this sounds extremely promising. I look forward to trying it out and will provide feedback for the beta phase... tnx... John

    Posted 12 years ago on Wednesday April 11, 2012 | Permalink
  7. GZA
    Member

    I have 2 scenarios for a site I'm planning which is selling posts as listings, i.e. accommodation providers pay to list their properties, and would like to know how the new calculations feature can help in our goal.

    #1 Let's say we have a base price per listing (post) of 50 but if the user wants to buy more listings then we can discount the subsequent listings using whatever criteria we decide, probably sliding discounts according to number of listings.

    The thing is, we don't want to discount the first listing, it has to remain at it's published price - just the additional listings will be discounted.

    Possible out of the box?

    #2 Let's say we want to price our listings according to capacity of accommodation, i.e. if host only has 1 accommodation to rent then they pay our minimum published price of say 50.

    Then, for each additional accommodation unit the host has we need to increment the price up to a maximum.

    We plan to make capacity a key element in our search results to ensure people don't try to game us.

    Possible out of the box?

    Posted 12 years ago on Thursday April 12, 2012 | Permalink
  8. #1 It is possible to use the new calculation functionality to implement a Product Field that has a negative price which would could be used to apply a discount.

    You would disable the quantity option on that field so that a quantity of 1 is assumed if it is present and then you could then apply conditional logic to this field and use that to determine when it should or should not be displayed and thus applied.

    You would have to be able to determine what that discount is via a calculation because the Price of the Product Field when configured as a Calculation field type is the result of the calculation.

    The trick to having the calculation return a negative value instead of a positive value will be to create your calculation so that it returns the amount of the discount you want to apply as a positive number and then wrap that calculation in parentheses and multiple it by -1.

    For example:

    (1+1) * -1

    That would result in a value of -2. 1+1 is 2 and when you multiple it by -1 it will result in the same value but as a negative. Just keep in mind that if the first part of the calculation results in a negative value, multiplying it by -1 would do the opposite and return a positive value.

    Because the Product Field is currently the only Pricing Field that supports calculations, the discount wouldn't actually apply to one of the other product field on your form like an option would. It would result in having a new Product line item on the order that has a negative price which results in discounting the total.

    #2 I can't tell if calculations will be good for this scenario or not. It sounds like it could be if you setup the calculation properly. All I can say is give the beta a shot and play around with the calculation functionality.

    Posted 12 years ago on Thursday April 12, 2012 | Permalink
  9. GZA
    Member

    Great stuff! Thank you Carl ;-)

    We're still gathering research for our project so this is a big help.

    Posted 12 years ago on Thursday April 12, 2012 | Permalink

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