This field allows the developer to create a field for rating using stars (or any other image), where the final user can select a rate option.
Define the field type to Rating.
The Label option lets you define the title of a field. Example: If the database field name is “cmp_rating”, You can display a different name for the user, like “Product Rating”.
Besides use a fixed text, the Label attribute allows the use of Langs to define the field title, allowing the internationalization of your application.
Label below field
Defines the message to be displayed below the field.
Define the subtitle of the field, below the ratings. Example: “Thank you for your feedback!”.
As in the Label, the subtitle attribute also allows the use of Langs for the internationalization of your application.
Amount of icons
It defines how many icons it will display in the field. The value set in this attribute must be according to the evaluation rules.
The Stars evaluating uses five stars usually, so, we must inform 5 in this attribute. After we set the images to “Enabled” and “Disabled” icons, the results are like this:
To use Like/Dislike, for example, we must inform 1 in the number of icons to display only one image and change it according to the click. In this case, we want to store in database 1 for like (enabled icon) and 0 for dislike (disabled icon). You can see the example below:
Define the icon to show for the selected amount. Following the like/dislike example, in this option, we must insert the Like image. We must do the same for a star evaluation, where for default, we must insert the stars filled .
Define the icon to show for the not selected amount. In this attribute, we set an image to represent the opposite of the previous images set in the Enabled icon.
Still referring to the example of the Like/Dislike, in this attribute, we must set the Dislike. .
As in the stars example, we must insert the image with the empty stars .
Initial Value (type)
Allow the definition of an initial value for the field when the form application is in insert mode. The only option available in this field is Defined. Selecting this option the attribute Initial Value will be showed for set the value.
Example: The initial value is 3 when inserting a new record, the rate field will initiate with 3 stars already selected.
The value defined in this attribute will overlap any value defined previously.
It allows saving the value of the field in a session variable(Global variable) to use it in other applications. For example, you can save the user name in the login form and display its value on the header of other applications.
It allows setting the name of the session variable that will receive the field value.
We must inform only the variable name, - var_rating.
We can get the value as a global variable.
HTML Object to display the field in the form.
It informs the data type of field in the database.
The Display Settings allows to define the CSS values individually for each field. For each Display schema of ScriptCase, there are the same attributes available in Interface.
Display Settings configuration Interface.
- CSS of the Title
- Font : Select the font type, that will be applied to the application field title.
- Font Size : Defines the font size, that will be applied to the application field title.
- Font Color : Choose a color to the font by using a valid hexadecimal color value or from the color picker.
- Background Color : You can define the color for the field by using a valid hexadecimal color value or from the color picker.
- Bold : Applies the bold style to the font.
- Underline : Set the underline style to the font.
- Border style : Choose a style for the border.
- Collapse : Defines the collapse for the border.
- Border Size : Applies the border size to the title of the field.
- Border Color : Choose a color for the border, using a color palette to apply to the title.
- Horizontal Alignment : Position the label of the field in the wanted position (left,right,center and justify).
- Vertical Alignment : Position the label of the field in the wanted position (baseline, sub, super, top, text-top, middle, bottom, text-bottom).
- Width : Defines a width for the title of the field.
- Height : Set a height for the title of the field.
Allow the developer to set up instructions and hints about the field’s use, allowing the developer to help the users about the system usage.
Description of the settings attributes.
In this area, you can set up a text that will be shown in the application according to the type of help selected below.
Pop-up - Display a default icon ! beside the field. To display the message just click in the icon that a Pop-up will be displayed with the help text.
Hint - Display a default icon ! beside the field. When the mouse is above the icon a help text will be displayed.
The icon displayed when selecting the types Hint or Pop-up vary according to the theme that is being used in the application. This icon can be modified in the CSS Buttons.
Text - Display a text inside of a
<span></span> beside the field.
Help button position
Allow to set up where the help button will be displayed in the field, there are two options:
Beside: The help icon will be displayed beside the field.
Column: The help icon will be displayed beside the label of the field.