• Hi,

    I try to accomplish the following task,

    Save the values of a form to the database.
    f.ex. A=2 , B=4 etc
    after saving the values to the database, and redirecting to a second page with on_sent_ok: “location.replace(‘/some-url/’);” , calculate on the second page the result of f.ex. A+B.

    But how i get always the result for that specific user, is there a possibility for an Session ID?

    An Ideas how to accomplish this task.

    Thanks a lot

    https://www.ads-software.com/extend/plugins/contact-form-7-to-database-extension/

Viewing 1 replies (of 1 total)
  • Plugin Author Michael Simpson

    (@msimpson)

    There is no easy way to do this because the plugin that creates the form and forwards to the next page is unaware of the plugin that is saving the data to the DB. When the form submission is saved, it gets a submit_time unique ID, but there is no way to feed that back to the browser.

    But the plugin will also save Cookie information. Go to the Database Options administration page and be sure “Save Cookie Data with Form Submissions” = “true”
    If you then have session information in the cookie you might be able to match that up on the second page as a parameter into the short code (see Cookie info this page)

    Also: If a user is logged-in when he submits his form, then his user name will be captured in the form data in the DB.

Viewing 1 replies (of 1 total)
  • The topic ‘Calculation with values’ is closed to new replies.