Join our new community forum for support & discussion

Join Now

Home Support Extensions Reviews Make rating stars not required

Make rating stars not required

  • Author
    Posts
  • re.cardoso

    Hey everyone, hope this message finds you well

    I would like to make the field Rating(stars) optional in order to submit the form. Is there anything I can change in order to accomplish that?

    I tried to change the required to false but it breaks the page

    ‘rating’ => [
    ‘label’ => esc_html__( ‘Rating’, ‘hivepress-reviews’ ),
    ‘type’ => ‘rating’,
    ‘required’ => false,
    ‘_alias’ => ‘comment_karma’,
    ],

    Thank you in advance for your time and support

    ihor developer

    Please try this one (you can add it via the Code Snippets plugin):

    add_filter(
        'hivepress/v1/models/review',
        function( $form ) {
            $form['fields']['rating']['required']=false;
    
            return $form;        
        }
    );

    Please note that some functions may still require the rating value.

    re.cardoso

    Worked fine…thanks so much

Viewing 3 posts - 1 through 3 (of 3 total)

The topic ‘Make rating stars not required’ is closed to new replies.