Back to Website
Show / Hide Table of Contents

Checkbox

  • Last updated on December 29, 2023
  • •
  • 1 minute to read

This widget displays a checkbox.

{
    "name": "agree-checkbox",
    "type": "checkbox",
    "params": {...}
}

Text

This is how a checkbox with text looks. The prompt property shows text near the checkbox.

Example of a checkbox

{
    "name": "my-checkbox",
    "type": "checkbox",
    "params": {
        "prompt": "I approve the design."
    }
}

Checkbox value

The value property defines whether a checkbox is selected or not. In the following example, the value is false.

Value of checkbox is changing by click

{
    "name": "my-checkbox",
    "type": "checkbox",
    "params": {
        "prompt": "I approve the design.",
        "value": false
    }
}

Managing other widgets by clicking a checkbox

In the following example, we activate the Finish button by a checkbox.

It works because the Finish button refers to the value of the checkbox.

Checkbox enables the Finish button

{
    "name": "my-checkbox",
    "type": "checkbox",
    "params": {
        "prompt": "I approve the design.",
        "value": false
    }
},
{
    "name": "my-finish-button",
    "type": "finish-button",
    "params": {
        "enabled": "{{$['my-checkbox']._}}"
    }
}
Note

You can write "{{$['my-checkbox'].value}}" instead of "{{$['my-checkbox']._}}". To learn details about syntax of dynamic expressions, read the Dynamic expressions article.

Auto reset

If selected, a checkbox will stay selected, even when you go back to previous steps and then return. This is the default behavior.

Auto reset stays the checkbox selected.

If you want to reset the checkbox value in this case, use the autoReset parameter.

Auto reset makes the checkbox unselected.

{
    "name": "my-checkbox",
    "type": "checkbox",
    "params": {
        "prompt": "I approve the result.",
        "value": false,
        "autoReset": true
    }
}

Params

Name Type Description Default value
prompt string text associated with checkbox empty string
value boolean if true, the checkbox is selected false
autoReset boolean if true, it resets the checkbox false
Was this page helpful?
Thanks for your feedback!
Back to top Copyright © 2001–2024 Aurigma, Inc. All rights reserved.
Loading...
    Thank for your vote
    Your opinion is important to us. To provide details, send feedback.
    Send feedback