Skip to content

Commit

Permalink
FI-3316: Add documentation for locking checkbox items (#66)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jammjammjamm authored Dec 3, 2024
1 parent a1e2e1b commit 85a5089
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions docs/writing-tests/test-inputs-outputs.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,37 @@ test do
end
```

It is possible to lock individual checkbox items. In the following example,
`Item 1` is not locked, so the user can check and uncheck it freely. `Item 2` is
checked because it is included in the `default`, and the user can not uncheck
it. `Item 3` is unchecked because it is not included in the `default`, and the
user can not check it.

```ruby
input :locked_checkbox_example,
title: 'Locked Checkbox Input Example',
type: 'checkbox',
default: ['value2'],
options: {
list_options: [
{
label: 'Item 1',
value: 'value1'
},
{
label: 'Item 2 - Locked checked',
value: 'value2',
locked: true
},
{
label: 'Item 3 - Locked unchecked',
value: 'value3',
locked: true
}
]
}
```

### Ordering Inputs
{:toc-skip}

Expand Down

0 comments on commit 85a5089

Please sign in to comment.