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.

Are there any "how to" guides

  1. Hi, new to the site. I'm looking for some guidance on integrating the forms with mysql databases - anybody point me in the right direction?
    Cheers

    Posted 14 years ago on Friday May 7, 2010 | Permalink
  2. We don't have a very good API/Hook documentation yet. However, I will be glad to help you out if you give a little more details on what you are trying to accomplish.

    Posted 14 years ago on Saturday May 8, 2010 | Permalink
  3. Thanks Alex,
    I want to work with the date submitted through forms. Sometimes to display on a web page - other times to add into a mysql database.
    I presume I need to put some php or mysql code in place but not sure where to put it - is it one of the hooks?
    Also - haven't tested this yet but i presume there is some validation of data input - for example in the email field - I presume there is a check that the input is in a valid email format. Can I add to that to put tin my own checks and validation on the input data?
    Thanks

    Posted 14 years ago on Saturday May 8, 2010 | Permalink
  4. The following code snippet uses the "gforms_post_submission" hook. This hook fires after every valid submission (after validation has taken place). You need to place this code in your theme's functions.php file. You can then modify it to save the date in your mysql database.

    add_filter("gform_post_submission", "save_date", 10, 2);
    function save_date($entry, $form){
       echo "date: " . $entry["date_created"];
    }

    As far as your second question, the advanced fields (email, phone, etc...) do have validation that enforce data to conform to the right format. However, we currently don't have support for custom validation, so you won't be able to add your own rules. We will build that in eventually, but it is not currently supported.

    Posted 14 years ago on Sunday May 9, 2010 | Permalink