We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 37242 ☆ A M B ☆
    • 339 Posts
    Hi MODX people,

    I'd like to enable visitors to submit comments / reviews / ratings on a website. I dont want them to do it without confirming the submitted data in their email inbox. So I am looking for a solution and if anyone ever did this before.


    1. User enters a comment in FormIt form
    2. FormIt has hook, sending email to user
    3. User clicks on link in email to confirm the submission
    4. Comment gets public

    I know that I would have to store the users email (or a hash) in the database with something like FormIt2DB.

    Please share your thoughts on this.

    Guido
      • 38415 ☆ A M B ☆
      • 70 Posts
      Hi Guido,

      you could simply use FormIt with a custom hook and Quip I guess… something like this:

      - use FormIt for general form validation and processing
      - write a custom FormIt hook that stores the submitted comment as a QuipComment xpdo object (with the active/approved flag to false) and set the hashed comment id as a FormIt field
      - in the same hook send out a email with a link (including hashed comment id) to a fixed resource that would run a snippet
      - that snippet would update the approval flag of the comment (based on the hashed id)

      …that should do the trick! Things you might pay attention to is that the hash is secure so nobody can guess the activation link and you might realize that everybody could also use a "throw away email" (see throwawaymail.com), so this activation doesn't make it magically secure…

      I got something very similar with custom DB objects, but it should work the same with Quip…

      Regards,
      Chris
        chsmedien - Digital Marketing Agency
        MODX Professional & Ambassador

        http://chsmedien.com | http://twitter.com/christianseel