> For the complete documentation index, see [llms.txt](https://community-test.logicnets.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://community-test.logicnets.com/release-9/platform-documentation/form-node-parts/slider.md).

# Slider

## Description

The Slider part creates a user-interactive slider mechanism to allow a user to set an input variable based on the position of the slider. Configuration settings allow you to choose the start and end numbers and the selection interval. Your choice of numbers impacts the user's experience when manipulating the slider:

* A rigid slider with very specific points along the slider bar, denoting definitive values and differences; e.g. 1 to 10 with a "stop" at each integer (2, 3, 4).
* A smooth slider without apparent specific landing points along the slider bar, allowing the user to determine where to rate the variable on the scale; e.g. a scale of 0 to 100.

The slider is added to the form part library, making it accessible from the nodes toolbox in Assessment Framework and Starter App Framework projects. It behaves much like any other form part in that it can have help/content resources added, and can adopt the same group styling etc.

The actual value chosen by the user is displayed in read only mode. This, along with the other labels are separate HTML elements and can be hidden or styled with CSS declarations. On first show, the slider can be given a default value (e.g. the mid point), or no value (in which case the slider is shown all the way to the left). Captions for the minimum and maximum values can be added.

Note that the slider is not currently supported by [Speech Input](/release-9/platform-documentation/advanced-topics/speech-recognition-voice-input/voice-input-with-assessment-framework.md).

## Editor Fields

### Basic and Style Tab Options

| Field Name         | Description/Use                                                                                                                                                                                                                                                                                                                                                                  | Type/Options | Optional/Mandatory |
| ------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------ | ------------------ |
| HTML enabled       | When this is enabled the question caption can be formatted using HTML.                                                                                                                                                                                                                                                                                                           | Yes \| No    | Optional           |
| Caption            | This is the caption shown in front of text-input control.                                                                                                                                                                                                                                                                                                                        | Text         | Optional           |
| Data object (Path) | This is the name of the data object in which the user input will be stored.                                                                                                                                                                                                                                                                                                      | Dataobject   | Mandatory          |
| Default value      | This is the value the system presents to the user and writes to context when no previous value exists.                                                                                                                                                                                                                                                                           | Text         | Optional           |
| Min                | This is the lowest value associated with the slider's far leftmost position. It can be numeric or $(...). It does not need to be 0, and it can be a negative value. This field defaults to 0 if left empty.                                                                                                                                                                      | Number       | Mandatory          |
| Max                | This is the highest value associated with the slider's far rightmost position. It must be higher than the minimum value. This field defaults to 100 if left empty.                                                                                                                                                                                                               | Number       | Mandatory          |
| Step               | <p>This sets the granularity of the slider.<br>- A step of 1 combined with 0 and 10 for min and max will force the input to be a whole number.<br>- A step of .01 will create a smoother slider, where the user can select any position and the data object will contain the selected position as a number to two decimal places.<br>This field defaults to 1 if left empty.</p> | Number       | Mandatory          |
| Submit on change   | This field is for use with Starter App Framework applications. You can choose to update the model when the user makes/changes their selection. For Assessment Framework applications, the system always submits the entry.                                                                                                                                                       | On \| Off    | Mandatory          |
| Format as currency | <p>When using currency, check this box to open additional inputs for selecting the following:<br>- Currency symbol (defaults to $)<br>- Position of symbol (prefix or postfix)</p>                                                                                                                                                                                               | On \| Off    | Mandatory          |
| Width              | This is the width of the text area in pixels.                                                                                                                                                                                                                                                                                                                                    | Text         | Optional           |
| Height             | This is the height of the text area in pixels.                                                                                                                                                                                                                                                                                                                                   | Text         | Optional           |
| Element template   | In this field you can reference a dataobject containing a part-template. See part-templates for more information.                                                                                                                                                                                                                                                                | Dataobject   | Optional           |

### Validation Tab Options

| Field Name | Description/Use                                                                                                                                                                                   | Type/Options | Optional/Mandatory |
| ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------ | ------------------ |
| Type       | When you configure this field, the system triggers a validation error when the user violates the configured condition. If you set it to *mandatory* the user must provide a value for that field. | Options      | Optional           |
| Condition  | This is only required when type=*custom***.** See [Setting Conditions](/release-9/platform-documentation/other-help-articles/setting-conditions-data-validation.md) for more information.         |              | Optional           |
| Message    | This is the message the system shows the user when he violates a validation rule. The system only displays the message for the first rule violated.                                               |              | Optional           |

### Advanced Tab Options

| Field Name                    | Description/Use                                                                                                                                                                                                                                                                                                                                                                                              | Type/Options | Optional/Mandatory |
| ----------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------ | ------------------ |
| Captions                      | This allows you to specify different captions based on rules. The system only displays one caption, the last caption in the table the rule determines to be true. If there is no rule the system determines to be true, the system uses the 'standard' caption. For an example, see [Multi-Caption Example Project](/release-9/example-gallery/example-projects-for-parts/multi-caption-example-project.md). | Text         | Optional           |
| Manual Slider Minimum Caption | This is the caption the system displays at the leftmost side of the slider, representing the minimum value. This can be $(...).                                                                                                                                                                                                                                                                              | Text         | Optional           |
| Manual Slider Maximum Caption | This is the caption the system displays at the rightmost side of the slider, representing the maximum value. This can be $(...).                                                                                                                                                                                                                                                                             | Text         | Optional           |

## Tips and Tricks

While it is not currently possible to directly assign text strings to different slider positions (e.g. for the use case of a slider from Very Satisfied to Very Unsatisfied), you can accomplish the same outcome by using a caption description. For example, you could use "On a scale of 1 to 10....." or "Indicate using the sliding scale your satisfaction level from Very Unsatisfied (left) to Very Satisfied (right)". While the slider stores numeric values, you can use a table to convert the score to a text string for ongoing use in the model or to display back to the user.

Use CSS declarations to change the look and/or position of key elements of the slider.

* To hide the numeric input use the following declaration

```
.slider_part_input {display: none;}
```

* To alter the look of the max values or captions use the following declaration, or similar: (use div#slider\_min to style the 'min' caption

```
div#slider_max, div#slider_min  {
color: red;
font-weight: bold;
font-style: italic;
}
```

## Example

Download the example project with various slider configurations [here](/release-9/example-gallery/example-projects-for-parts/slider-example-project.md).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://community-test.logicnets.com/release-9/platform-documentation/form-node-parts/slider.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
