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.

User Form Data Populates Wordpress Page then used in a calculation - How?

  1. Firstly, I just wanted to say (for anyone searching the forum) that I have CraftyClicks postcode/addressing software working on Wordpress with Gravity Forms, so if anyone has CraftyClicks problems, drop me a note and I'll send you the code I have for it... or if the mods could suggest somewhere I could post it in the forum, I could do that. It's a section of code for a html block which adds address confirmation via postcode search then fills the Gravity address sections field.

    Secondly, now I've sorted that, I have a much bigger problem - I need to figure out how to use the numbers data/prices data in Gravity to populate some fields in a Wordpress page that will then calculate 71%-76% of the value of one of the Gravity-populated fields and show it to the person who just submitted the forms. I've one or two other calculations I want to do - but I imagine doing that side of things will be javascript.

    What I'm wanting to know is how can I get specific fields in my gravity form to show within the structure of a wordpress page separate to the form. The page will change for each user, based on the figures they've supplied previously in the Gravity Form.

    Would that field need to be a number field, or a user-submitted price?

    It's for the value of a house - so will be somewhere between £80,000 and £1,000,000 so for example, if a user submitted £100,000 in the Gravity Field, that £100,000 would appear on the Wordpress page they're sent to after submitting the form, then below it a dynamically populated field containing "£71,000 to £76,000" would be displayed, and perhaps a few others calculated differently.

    If anyone can offer any sage advice about how to achieve this, or point me in the right direction for more info on the matter (I tried searching, but didn't find a similar thread), I would be really grateful for your help.

    Thanks in advance,

    Rob

    Posted 12 years ago on Saturday September 24, 2011 | Permalink
  2. robbell, you can paste the code at pastebin.com or pastie.org and then create a new topic with a clear title describing what you are providing. I'm sure it will prove useful to someone.

    Reviewing the rest now...

    Posted 12 years ago on Saturday September 24, 2011 | Permalink
  3. Regarding using information entered in a Gravity Form in your WordPress page, I think you want to store the numbers in custom fields, then use those custom fields in your template. In your template, you can call a function to perform whatever math you want, and display the information however you want. This is outside the scope of what Gravity Forms can do. Gravity Forms collects the data; i's up to you to display it however you want.

    http://codex.wordpress.org/Custom_Fields
    http://codex.wordpress.org/Function_Reference/get_post_meta

    Posted 12 years ago on Saturday September 24, 2011 | Permalink