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.

Merge Tag Calculations with Default Value

  1. This is a pretty straightforward question, I am just not sure if it is possible with the GF merge tags.. in essence it is an if statement, which I know GF doesn't do but maybe it is still possible.

    Essentially I want to do a price calculation, based on a checkbox product price field for the default value, soo basically:

    calculation = {field default} - {field value}

    So if I have a checkbox field for +$20 the calculation would be $20 - $20 if checked, $20 - 0 if not checked...

    possible?

    Posted 6 years ago on Monday September 10, 2012 | Permalink
  2. Can you provide a link to your form where this is being used? I am having a hard time envisioning it. Thank you.

    Posted 6 years ago on Saturday September 15, 2012 | Permalink
  3. hookahi.com/example --click the 'reserve' button

    To explain better, the form is being used with WooCommerce and the grav forms addon for that. After checkout the information from the form is used to create a cpt for a calendar and reserve a time on the calendar. The form has a checkbox to select deposit or full payment. What I am looking to do is include a metabox for the cpt for "Amount due" so that if deposit is checked, it does a calculation for full cost - deposit cost = amount due. To do that I was hoping to simply use the deposit cost field; for example, if the deposit is $50 by default, then you could do $50 - the value (so the value would be $50 if it is checked, or $0 if it is not check). Does that help at all?

    Posted 6 years ago on Monday September 17, 2012 | Permalink