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.

PHP session variables

  1. I found a post about using Gravity Forms to set a cookie and then using that data to pre-populate other form fields. However, we actually create a PHP session variable to store several data fields when people login, using a custom user authentication system. I would like to pre-populate certain Gravity Form fields with session variables from that session. In a standard html form this is pretty simple and straightforward, but the Gravity Forms plugin doesn't seem to allow insertion of the standard php code. Any tips on how we could easily accomplish this? Thanks.

    Posted 13 years ago on Wednesday February 9, 2011 | Permalink
  2. Did the post you found about setting a cookie and using that data to pre-populate form fields have sample code in it to show you how to do this?

    If so that should be sufficient to do what you need to do. Just replace the pieces of the code that read/write to a cookie with code that read/writes to a session variable. It's the same workflow only you would use session variables instead of a cookie.

    Posted 13 years ago on Wednesday February 9, 2011 | Permalink