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.

Send a value to gravity froms for calculations

  1. Hi is it possible to send a value to gravity froms ie a number,

    then use gravity froms inbuilt calculation function to manipulate that number

    i know i could do this via js, but would rather have this coded in php

    Posted 12 years ago on Tuesday September 18, 2012 | Permalink
  2. David Peralty

    Can you give me more information on how you would expect this to work? I'm not sure I understand what you are trying to do. You can pass a number to a Gravity Forms form through query strings or through pre-rendering a field. On load of the form, you could let the form grab this number and do things to to it, but the calculations are mostly done and displayed through JS.

    Posted 12 years ago on Tuesday September 18, 2012 | Permalink
  3. Hi thanks for getting back to me

    yes we here is what i want to do

    i am going to use googles adwords api to find out the search volume of a keyword, lets say its gravity froms = 123222 searches per month

    This will happen on a separate form nothing to do with gravity froms

    then i want to pass this number to a product in gravity froms or a field

    then i can use gravity froms inbuilt calculation to work with this number.

    customers would need to fill in the gravity from to get to the next step so they can see the final calculations,

    hope this makes sense

    will

    Posted 12 years ago on Tuesday September 18, 2012 | Permalink
  4. Create a field in your form. Since you are going to be using calculations, be sure to use a number field. Make the field visibility admin only if you want.

    On the advanced tab, check the box "Allow this field to be populated dynamically" and then give it a unique parameter name, like "volume". Then, when you access the page with the form in it, use the url such as http://example.com/check-your-keyword-cost/?volume=123222 . That will pre-populate the field with the parameter name of "volume" with the data 123222.

    Does that answer the question for you? You can read more about dynamic population here:
    http://www.gravityhelp.com/documentation/page/Using_Dynamic_Population

    I described this specifically:
    http://www.gravityhelp.com/documentation/page/Using_Dynamic_Population#Query_String

    Posted 12 years ago on Tuesday September 18, 2012 | Permalink