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.

Store form entries in PHP session, use to populate other forms across site

  1. mmtrav
    Member

    Hi guys,

    I'm a bit new to this but have this burning curiosity to see if I can figure it out. I've been combing the forums but still don't quite know how to approach my issue and exactly what code or hooks I need.

    I want to collect some basic information in one initial sign-up form, and then let my user wander into various other parts of the site. If they decide they want to fill out another form, I would like their previous entry to pre-populate the other forms.

    From what I gather, API hooks and PHP are the tools I need. I'm thinking that I need to store the first initial submitted value into a PHP session, and then pre-populate the form using the dynamic fields -- I've already got the hang of making the form fields available to pre-populated from query strings, but I don't know how to do this from PHP.

    I think with a bit of handholding I can figure this out AND learn how to do it in future at the same time -- I don't really have budget to hire somebody to do it for me, but if there is anybody out there who is willing to train me on this for a fee I'd love to hear from you.

    Otherwise, could I get some help from you, Carl or Alex or anybody else on the team?

    Posted 8 years ago on Tuesday December 14, 2010 | Permalink
  2. mmtrav
    Member

    My goodness, did the Similar Topics widget just help me find my answer?

    http://forum.gravityhelp.com/topic/little-hint-from-me-save-user-input-in-cookie-and-prepopulate-form

    Posted 8 years ago on Tuesday December 14, 2010 | Permalink
  3. Yes, that forum post should put you on the right track. You can store values in a cookie (OR a PHP session, but cookies don't use server resources) and then populate fields from those values.

    Posted 8 years ago on Tuesday December 14, 2010 | Permalink