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.

Retrieving form data with php

  1. michaelbyrd123
    Member

    Is there any clean function or anything for retrieving form data? I need to use submitted forms to populate a calendar with the results, and am new to gravity forms.

    Posted 14 years ago on Wednesday November 24, 2010 | Permalink
  2. You can use PHP to retrieve data from MySQL like any other approach.

    Gravity forms saves the data as a post, or other format...but

    It also allows you to redirect the form data, on submit, as form variables to another page instead of directly placing it in the database. You could then use the variables to do anything you like. Toss in some Ajax to add the data to your calendar database and the client will be none-the-wiser.

    Posted 14 years ago on Wednesday November 24, 2010 | Permalink
  3. michaelbyrd123
    Member

    Thanks,

    I ended up directly grabbing the information straight from the gravity lead, and lead detail table, and parsing the entries into individual rows from there. Is there anything wrong with this approach, or would it be better to create a separate database, and use the form redirect?

    Posted 14 years ago on Thursday November 25, 2010 | Permalink
  4. if you have multiple forms being saved then it might not be the best option. Depending how big your website data grows to based on form data, I would probably optimize the database a bit by creating a seperate table.

    You would want to do this from within MySQL, however. Otherwise you'll be messing around with GF in order to send the data to a different location (unless you output it to a different page and store from there).

    For a larger database it will be easier to manage the primary keys, indexes, and so on in a seperate table.

    Posted 14 years ago on Thursday November 25, 2010 | Permalink
  5. michaelbyrd123
    Member

    Thanks, I'm gonna go ahead and take your advice and create a separate table. Now That I think about it, with all my other forms I'll be doing alot of unnecesary queries if I do it this way.

    Posted 14 years ago on Thursday November 25, 2010 | Permalink