Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

Introduction

 The Star Rating Plugin is a form element that users can easily click to give rating. Users can also view the rating at datalist using the datalist formatter.

Plugin Information

Plugins Available in the Bundle:

  1. Star Rating

  2. Star Rating Datalist Formatter

This plugin bundle is compatible with Joget DX 7 and onwards.

Expected Outcome

The user is able to rate the submitted record through form element, and able to view the rated value through form or datalist formatter.

Image Added

Figure 1: Form Star Rating


Image Added

Figure 2: Datalist Star Rating

Get Started

Steps

1. You can obtain the jar file by the latest release at https://github.com/jogetoss/star-rating.

2. Upload the plugin jar file in Joget by going to Settings → Manage Plugins.

3. You can choose to import the demo app from JogetOSS or create the app from scratch.

Steps for creating app from scratch

1. First, simply create a form and drag the Star Rating form element into the form. For plugin configurations, refer to

Image Added

Figure 3: Star Rating form element 


2. Click on right up corner Generate App > Generate CRUD.

Image Added

Figure 4: Generate CRUD for form


3. Go to the list generated. Add Star Rating Datalist Formatter for the same star rating field from the form.

Image Added

Figure 5: Star Rating Datalist Formatter at List Builder


4. Now run the UI. Click new to add a new record and give a star rating value.

Image Added

Figure 6: New Record for Star Rating


5. Click save. Now you can view the value from both the datalist and form.

Image Added

Figure 7: View Star Rating at Datalist

Star Rating Plugin Properties

Configure Star Rating

Image Added

Figure 8: Star Rating Form Element Configurations

Name

Description

Label 

Menu label.

ID *

Menu element unique ID.

Data

Heading.

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 the input value, more information at Form Validator.

Info
titleWhen will validation takes place?

Validation will take place whenever a form is submitted, except when it is submitted as "Save as Draft".

UI

Heading

Readonly

Determines if the element is editable.

Rating Color *

The color of the value of the rating.

Hover Selected Color *

The color when hovering selected rating color.

Hover Unselected Color *

The color when hovering unselected rating color.

Workflow

Heading

Workflow Variable

If the form is part of a workflow process, upon saving of the form (by clicking on "Save as Draft" or "Complete" button). The value in this input field will be saved into the corresponding workflow variable named here.

Info
titleUsing a non-existent Workflow Variable name

You will get the following warning with the name printed out (e.g. status) in the server log if you attempt to map to a non-existent Workflow Variable.

Code Block
context attribute status does not exist in process context - adding new attributes to the process context is not allowed


Image Added

Figure 9: Star Rating Datalist Formatter Configurations

Name

Description

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.