Review validation not working properly - by hugompalma

This topic has 2 replies, 2 voices, and was last updated 6 years, 3 months ago ago by Rose Tyler

  • Avatar: hugompalma
    hugompalma
    Participant
    July 28, 2018 at 13:41

    Hi,
    i’ve found a few issues in the review validation process.

    First issue is that when you leave the comment field empty nothing happens. Meaning that the submit button doesn’t do anything and nothing is displayed to the user. I can see in the javascript associated with the button that it’s adding a ‘validation-failed’ css class to the comments input, but this class isn’t defined in the theme style. So nothing happens. Also, besides the css class a dialog box with an error message should be displayed just like it’s displayed if i don’t select a rating (and rating is mandatory).

    The second issue is that when i successfully enter a review, the review is created but no message is shown to the user. The page just gets refreshed.

    Thanks.

    1 Answer
    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    July 30, 2018 at 15:35

    Hello,

    1. Thanks for the notice. We will fix it in next theme update.
    As a temporary solution, you may edit woopress/woocommerce/single-product-reviews file and change this http://prntscr.com/kctp2t to
    $comment_form['comment_field'] .= '<div class="form-group"><label for="comment" class="control-label">'.__('Your Review', 'woopress').'</label><textarea id="comment" name="comment" cols="45" rows="12" aria-required="true" required></textarea></div>';
    + add this code in custom css:

    .tab-content-inner #commentform textarea {
        width: 100%;
        outline: none;
    }

    2. It works in the same way with default WC theme – Storefront.

    Regards

  • Viewing 2 results - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.Log in/Sign up

8theme customization service
We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.