Skip to main content

Collect votes and reviews

Audience: content managers and administrators.
Time: 10 minutes.
New in 5.5: the Voting field accepts real reviews (text, author, rating, moderation, usefulness) in addition to star voting.

The Voting field allows two distinct things:

  1. vote: assign a star rating;
  2. publish a review: title, name, email, text and rating, subject to moderation.

Reviews are displayed in the detailed view of an item. In category lists or modules, only stars and, if enabled, the review counter are displayed.

1. Enable reviews on a Voting field​

  1. In administration, open Components > FLEXIcontent > Fields.
  2. Edit (or create) a Voting type field.
  3. In vote/review settings:
    • Enable reviews (allow_reviews): 1 to enable reviews;
    • Allow submit review by (allow_submit_review_by):
      • Disabled (0),
      • Anyone (1),
      • Logged users (2),
      • Access level (3, then choose review_submit_access);
    • Approval (do_approval): 1 by default, reviews remain pending validation;
    • Review placement (reviews_placement): Inline (0) or Modal window (1);
    • Reviews per page (reviews_page_size): 5 by default;
    • Useful votes (reviews_useful): disabled (0), logged users only (1) or open to all (2);
    • Store rating with review (reviews_store_rating): 0 by default, submitting a review does not automatically add a vote;
    • Max review length (reviews_max_length): 500 characters by default;
    • Counter in lists, Loader, Live update (reviews_counter_in_lists, reviews_loader, reviews_live_update): 1 by default.
  4. Save the field.

Star appearance​

Settings stars_size (24 px), stars_tooltips (1), stars_color (#FFB400) and stars_color_empty (#CCCCCC) control star display. Vote form visibility is given by vote_submit_inview and access level submit_acclvl.

:::warning Status The review feature is still marked ALPHA in language files. The “Verify email ownership” setting is displayed but disabled: email address ownership is not verified. :::

2. Submit a review on the site​

On an item page containing the Voting field:

  1. Click Review this item.
  2. Fill A short title, Your name, Your email and Your text.
  3. Choose your rating in Your rating (stars).
  4. Click Submit.

If moderation is active, the author sees Awaiting approval, visible only to you; other visitors do not see the review until it is approved.

The review list displays:

  • No reviews, be first if there is no review;
  • 1 Review / %d Reviews as counter;
  • All reviews (%d) and Show all to display the full list;
  • a filter by number of stars;
  • Was this helpful? with Yes / No answers if usefulness voting is enabled;
  • Edit and Delete actions for the authorized author.

3. Moderate reviews in administration​

Open Components > FLEXIcontent > Reviews. The table offers columns: Title, Status, Item, Reviews, Rating, Reviewer, Email, Helpful, Approved, Verified, Created, Modified, ID.

Available actions are Approve (publish) and Trash (trash); pending rows bear the mention Awaiting approval.

The Reviews dashboard card opens this manager directly, provided reviews are enabled and a Voting field with allow_reviews > 0 exists. See Customize the dashboard.

Reviews are stored in #__flexicontent_reviews, usefulness votes in #__flexicontent_reviews_useful. The global vote and review counter are independent.

4. Microdata and SEO​

In the item view only, a positive rating produces aggregateRating microdata:

  • bestRating = 100;
  • ratingValue = rating converted to percentage, rounded;
  • ratingCount = number of votes.

These microdata are generated only for the main item identifier and for an authorized item_microdata_itemtype. In 5.5, the itemReviewed property was removed from rating microdata and a fatal error on items with extra votes without a rating row was fixed.

Good to know​

  • In composite voting (ratings on several criteria), AJAX refresh of the review list is refused with the Composite voting error: reload the page.
  • reviews_store_rating = 0 means a 5-star review does not increase the global rating: they are two distinct data points.
  • Do not override the plugins/flexicontent_fields/core/tmpl/voting/value_default.php template: it carries the warning “DO NOT OVERRIDE THIS FILE YET !!” because its API is still evolving.
  • The review count and average rating are calculated server-side; star filter and pagination are handled by the component.

See also​