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.

How do I generate a product price using Field Calculations?

  1. Let's say I have a product that is $200. I want to offer a 50% discount.

    Can I have a field that says: Have coupon? If they enter in the correct code, it generates a product price of $100. Is this possible? I read the Field Calculations description on the site and it sort of suggested that such a thing could be accomplished...

    Posted 12 years ago on Wednesday November 21, 2012 | Permalink
  2. David Peralty

    Do you want to offer 50% off just a single instance, or 50% off each of the quantity that they select?

    Posted 12 years ago on Wednesday November 21, 2012 | Permalink
  3. Well there won't be any quantity for this. Ultimately we'd like to offer a 25% discount, a 50% discount, and a 100% discount. I assume the logic would be the same regardless of the amount though...

    Posted 12 years ago on Wednesday November 21, 2012 | Permalink
  4. David Peralty

    That's correct. You can create Products that have negative values and then use an input field for a person to enter the code. Then using Conditional Logic, you can have those negative value products display or hide based on the code entered in the input box.

    Posted 12 years ago on Wednesday November 21, 2012 | Permalink
  5. David Peralty

    So if you know your main product is $200 and you want to give them a discount of 50%, you can create a product called 50% off, make the price -100 and then set it via Conditional Logic to only show when Coupon Code is valid.

    Posted 12 years ago on Wednesday November 21, 2012 | Permalink
  6. The part I'm stuck on is not knowing how to check whether or not the coupon code is valid....I don't really know how to use the calculations function. Would you be able to give me a hand?

    Posted 12 years ago on Wednesday November 21, 2012 | Permalink
  7. David Peralty

    You don't need to use the calculations function, do you? As for checking the coupon code, in your conditional logic, you would have a "Show this field if All is true" You would select the input field where the user will type in their code, and then on the right, you would type in the code you want to be the "valid" code.

    Posted 12 years ago on Wednesday November 21, 2012 | Permalink
  8. Ugh so simple! Now I feel stupid :) Thanks for the help!

    Posted 12 years ago on Wednesday November 21, 2012 | Permalink
  9. Can you provide a sample code for adding a coupon code to a Gravity Form?

    Posted 12 years ago on Wednesday December 5, 2012 | Permalink
  10. David Peralty

    Depending on what you want to do, there is no code required. All of the steps are listed above, and if you need any more assistance, let me know.

    Posted 12 years ago on Wednesday December 5, 2012 | Permalink
  11. Sorry for the inconvenience. I took a closer look at your post and figured in out.

    Posted 12 years ago on Wednesday December 5, 2012 | Permalink