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.

Listing previous submissions by logged in user

  1. I'm creating an online assessment tool using GravityForms. In order to take the assessment, the user needs to be logged in. Registered users can take the assessment any number of times.

    Once they log in, I'd like to show them a page which lists all of their assessments.

    I know Gravity stores submission in the wordpress database but what is the best method of accessing the information based on the current user?

    Thanks,

    Don...

    Posted 11 years ago on Monday May 14, 2012 | Permalink
  2. David Peralty

    I would say that they best way to do this would be to create posts from their submissions using their logged in user as the author.

    http://gravitywiz.com/2012/04/25/set-registered-user-as-post-author/

    Then you can create a template file in WordPress to pull posts by logged in user. You could also test each post for logged in as well to keep them hidden from other people. Then data access would be easy using WordPress posts, and custom fields.

    http://www.gravityhelp.com/documentation/page/Form_Fields#Post_Fields

    That would be the easiest way to do what you want.

    Posted 11 years ago on Monday May 14, 2012 | Permalink
  3. Hi David,

    I'm not sure if this will work or not. Separate forms are used for the assessment tool and registration.

    If I add a "Post Field" to the registration form, I can see the "Set as Post Author" option but only on the Registration form, not the Assessment form.

    Posted 11 years ago on Tuesday May 15, 2012 | Permalink
  4. I've figured out much of what I need to accomplish but have come across what i think might be a bug.

    I have jquery ui sliders writing their values to Custom Post fields (set to Number). This works great until I set their filed visibility to "Admin only" instead of "Everyone". When they are set to "Admin only", the values are not written to the database upon submission and not outputting to the auto-created post.

    Any ideas why this would be or workarounds for this issue?

    Posted 11 years ago on Thursday May 17, 2012 | Permalink
  5. What if a work around could be to do a display: none via CSS on the fields rather than Admin Only? Could be worth a shot.

    Posted 11 years ago on Thursday May 17, 2012 | Permalink
  6. I'll give that a try. I was thinking of that or to position them off screen somehow.

    Posted 11 years ago on Thursday May 17, 2012 | Permalink
  7. display: none; seems to work. thanks.

    Posted 11 years ago on Thursday May 17, 2012 | Permalink
  8. Awesome! Thanks for letting us know.

    Posted 11 years ago on Thursday May 17, 2012 | Permalink