• Resolved cruiseback

    (@cruiseback)


    Hi, first off, thanks for a great plugin.

    I have been looking for the following functionality all over, but can’t seem to find it, so I’ll try here. (I am a total php beginner, so please bare with me)

    Basically, I want my users to be able to see data previously submitted by themselves.

    They would need to authenticate themselves by, let’s say, inputting the email adress they used when submitting the data earlier.

    I would then like to pull all tables from the database containing that particular email-adress and display for them, maybe give the them ability to print it, generate a pdf etc..

    This might be outside the scope of this plugin, but maybe someone has done something similar to this, or have an idea about how to achieve such a functionality?

    Thanks in advance.

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

    (@msimpson)

    You can do this with the latest version by using the [cf7db-table] shortcode. You will need to read about the shortcode in the FAQ and read up on the example [cf7db-table form="your-form" filter="email=$user_email"]

    Thread Starter cruiseback

    (@cruiseback)

    @msimpson

    Thank you for your fast and awesome reply.

    I am looking into your example now.

    One additional question though.

    It was perhaps stupid of me to write:

    Basically, I want my users to be able to see data previously submitted by themselves.

    Since, it’s not really ‘users’ in the traditional WordPress-sense that needs to be able to retrieve previously submitted data.
    It’s more like, clients or customers maybe.

    So, can I make some sort of form-dialog where the client first will need to specify the previously used email adress and then get a list of all tables submitted using that?

    Thanks in advance.

    Plugin Author Michael Simpson

    (@msimpson)

    I understand now what you mean. At the moment, there is not a way to identify a user who is not logged in.

    But since that seem generally useful, I will see if I can code up something where you could specify something like filter="email=$POST['email']. In that case you would have to create the form and post to the page that has the shortcode, and use this syntax to pass a form parameter value to the shortcode. I’ll post here when I do that.

    Thread Starter cruiseback

    (@cruiseback)

    @msimpson

    Thank you for the feedback, and for wanting to add this functionality into the plugin.

    I am looking very much forward to this since this little piece of functionality is the only thing I need in order to get the site ready.

    Since I don’t really (apparently) have any shame in life, I have bribe.. ehmm.. donated to your awesome plugin as an appreciation of the work you have done.. ??

    Thanks, lars

    Plugin Author Michael Simpson

    (@msimpson)

    All bribes are welcome!

    Plugin Author Michael Simpson

    (@msimpson)

    OK, I added this to version 1.5 which I released today.

    You can now use something like [cfdb-table filter="email=$POST(email)"] to match DB form field “email” with HTTP posted parameter “email”. You can also use $GET and $COOKIE in addition to $POST. If you use $GET, then you can just add the parameter to your URL (e.g. https://...../?p=1&[email protected]

    Try this out and let me know if it works OK for you.

    Look at the FAQ for more details.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘[Plugin: Contact Form 7 to Database Extension] Lookup previously submitted data’ is closed to new replies.