Support

Account

Home Forums General Issues Record, store, and retrieve field content per session

Solving

Record, store, and retrieve field content per session

  • Hi all,

    I would like to create something like a report list or a condition survey.

    The user should click through different report pages and fill in question fields. Afterwards, the user should be able to print out a PDF in which the fields filled in during the current session are displayed.
    These should then be sorted chronologically and by user name. Therefore, a session ID is to be created, e.g., from the user name and the login time. The next time the user logs in, the fields are to be empty again, but at the same time all submitted reports are to be retrievable in a table afterwards.

    Is this possible with ACF? If yes, I would appreciate any help (hints, a link to tutorials, examples, video etc.).

    Many thanks in advance!

    Patrick

  • ACF could help, but this would be more than just an acf project. The best I can do is offer a little advice.

    I would use a custom post type for each report “session”. I would use ACF to create the “session key” field. Then when the person visited the edit page when generating the acf_form() arguments I would look to see if there is already a post with the correct session key and if there is then I would use that post ID and if not then I would set acf_form() to create a new post.

    This would also make it possible to show the posts because you can decide on whether or not to show the form or the content of the post based on the user that is logged in when loading and existing post.

    There would be a lot of other details to work out because you’re talking about an entire application, not just adding a few fields.

    As far as the rest. Printing a PDF is far beyond the scope of ACF. Creating tables and other output is doable.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.