1. The Prevent multiple submissions by email address snippet will only work if you are assigning your reviews to a page (using the “assign_to” option in the [site_reviews_form] shortcode) AND you are using the email field in the form.
If you are not assigning reviews, you will need to remove the following code from the snippet:
) || empty( $request['assign_to']
and
['key' => 'assigned_to', 'value' => $request['assign_to']],
2. For this you have two options. The simplest is to redirect the page after the review has been submitted. Please see the Site Reviews > Documentation > FAQ” page for instructions on how to do this.
If you would prefer not to redirect the page, then the other option is to add the following custom CSS and Javascript to your website:
The custom CSS
.glsr-form {
transition: max-height 0.4s, opacity 0.4s;
opacity: 1;
}
.glsr-hide-form {
max-height: 0 !important;
opacity: 0;
overflow: hidden;
}
The custom Javascript
document.addEventListener('site-reviews/after/submission', function (ev) {
if (false !== ev.detail.errors) return;
ev.detail.form.classList.add('glsr-hide-form');
ev.detail.form.insertAdjacentHTML('afterend', '<p>' + ev.detail.message + '</p>');
});
What this does is hides the submission form (slide-up animation) once a review has been successfully submitted and shows the success message in its place.
3. If you are only allowing registered users to submit reviews and you want to restrict them to only one review each and hide the form if they have already submitted a review, please see: https://pastebin.com/vWhsaT7Z
-
This reply was modified 5 years, 3 months ago by Gemini Labs.