• Resolved bba01

    (@bba01)


    Hi and thank you for an awesome plugin. I need to do something when user clicks the submit review button but before the review is saved to the db. What hook should I use for that?

    With best regards,

    bb

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Gemini Labs

    (@geminilabs)

    It depends. Are you trying to modify the review data before it is saved, or do you just need to do something immediately after the review is created?

    • This reply was modified 3 months, 1 week ago by Gemini Labs.
    Thread Starter bba01

    (@bba01)

    Hi and thanks for the swift answer!

    I don’t want to modify anything. I want the user to identify their identity with my countrys official system for that which is a QR code shown in a popup they have to scan with their phone. Which one should I choose?

    /b

    Plugin Author Gemini Labs

    (@geminilabs)

    In that case it’s a little more complicated. Since you are wanting a user interaction to happen, you will probably need to use a javascript event instead.

    A site-reviews/form/handle javascript event is triggered after the response is returned from the server when a review is submitted and the event has two parameters: response contains the response object from the server and form is the form HTML element.

    For example, you could use this event to display the QRCode in a popup or insert it under the success message in the form to request the the user verify their submitted review by scanning the QRCode. When they scan it, you can check the Bank ID response and if successful, use the Site Reviews API to update the new review and mark it as verified.

    This would require a bit of work on your part however, and it’s a little outside the scope of support here.

    • This reply was modified 3 months, 1 week ago by Gemini Labs.
Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.