Star Rating Plugin

Introduction

The Star Rating Plugin is a form element that allows users to easily give a rating by clicking on stars. This rating can also be viewed in a datalist using the Star Rating Datalist Formatter. The plugin is designed for ease of use and visual appeal, making it a great addition to forms and lists where user ratings are needed.

Plugin information

  • Plugins Included:
    • Star Rating
    • Star Rating Datalist Formatter
  • Compatibility: Joget DX 7 and onwards

Get started

Where to get the plugin

You can download the latest release of the Star Rating plugin from the following link: Star Rating Plugin on GitHub.

How to install

  1. Download the plugin's .jar file from the GitHub repository.
  2. In Joget, navigate to Settings > Manage Plugins and upload the .jar file.
  3. You can import the demo app from JogetOSS or create an app from scratch.

How to use it

Steps for creating an app from scratch

  1. Create a form and drag the Star Rating form element into it. For plugin configurations, See Configure Star Rating Properties.

  2. Click on the top right corner and select Generate App > Generate CRUD.
  3. Go to the list generated from the CRUD process. Add the Star Rating Datalist Formatter for the same star rating field from the form.
  4. Run the app's UI. Click New to add a new record and give a star rating.
  5. Click Save. You can now view the rating value in both the datalist and the form.

Configure star rating properties

Fields to configure:

  • Label: Menu label.
  • ID: Unique ID for the menu element. Mandatory Field.
Advanced 
Data 

Fields to configure:

  • Enable Half Value (.5)?: If checked, it will enable the capability to assign ratings with half values, such as 1.5, 2.5, 3.5, etc.
  • Validator: Attach a Validator plugin to validate input values. For more information, see Form Validator.
    When will validation take place?
    Validation will occur whenever a form is submitted, except when submitted as Save as Draft.
UI

Fields to configure:

  • Readonly: Determines if the element is editable. 
  • Rating Color: Set the color of the rating value. Mandatory Field.
  • Hover Selected Color: Set the color when hovering over selected stars. Mandatory Field.
  • Hover Unselected Color: The color when hovering over an unselected rating color. Mandatory Field.
Workflow

Field to configure:

  • Workflow Variable: If the form is part of a workflow process, upon saving the form (by clicking on the Save as Draft or Complete button). The value in this input field will be saved into the corresponding workflow variable named here.
    Using a non-existent Workflow Variable name
    If you attempt to map to a non-existent workflow variable, you will get the following warning with the name printed out (e.g., status) in the server log.
    context attribute status does not exist in process context - adding new attributes to the process context is not allowed

Configure star rating datalist formatter 

Fields to configure:

  • Enable Half Value (.5)?: If checked, it will enable the capability to assign ratings with half values, such as 1.5, 2.5, 3.5, etc.
  • Rating Color: The color of the value of the rating.

Expected outcome

After implementing the Star Rating Plugin, users can submit a rating through the form, and the rating can be viewed both in the form and the datalist using the formatter.

  • Star Rating form element.
  • Star Rating in the datalist.

Download plugin

Download the Star Rating Plugin from the Joget Marketplace.

Download sample app

Download the demo app for the Star Rating Plugin:
Created by Julieth Last modified by Aadrian on Nov 19, 2024