8000 docs: add new dynamic parameters information to parameters doc by EdwardAngert · Pull Request #17653 · coder/coder · GitHub
[go: up one dir, main page]

Skip to content

docs: add new dynamic parameters information to parameters doc #17653

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 19 commits into from
May 19, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
make fmt
  • Loading branch information
stirby committed May 16, 2025
commit 1e0779761c92fa043723c3e0f977e768cb085fe7
24 changes: 12 additions & 12 deletions docs/admin/templates/extending-templates/parameters.md
Original file line number Diff line number Diff line change
Expand Up @@ -471,19 +471,19 @@ Different parameter types support different form types.

The "Options" column in the table below indicates whether the form type requires options to be defined (Yes) or doesn't support/require them (No). When required, options are specified using one or more `option` blocks in your parameter definition, where each option has a `name` (displayed to the user) and a `value` (used in your template logic).

| Form Type | Parameter Types | Options | Notes | Example |
|----------------|--------------------------------------------|---------|---------------------------------------------------------------------------------------------------------------------------------|---------|
| Form Type | Parameter Types | Options | Notes | Example |
|----------------|--------------------------------------------|---------|---------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `checkbox` | `bool` | No | A single checkbox for boolean parameters.<br>Default for boolean parameters. | <details><summary>checkbox</summary> ``` tf data "coder_parameter" "enable_gpu" { name = "enable_gpu" display_name = "Enable GPU" type = "bool" form_type = "checkbox" # This is the default for boolean parameters default = false } ``` </ details > |
| `dropdown` | `string`, `number` | Yes | Searchable dropdown list for choosing a single option from a list.<br>Default for `string` or `number` parameters with options. | placeholder |
| `input` | `string`, `number` | No | Standard single-line text input field.<br>Default for string/number parameters without options. | placeholder |
| `key-value` | `string` | No | For entering key-value pairs (as JSON). | placeholder |
| `multi-select` | `list(string)` | Yes | Select multiple items from a list with checkboxes. | placeholder |
| `password` | `string` | No | Masked input field for sensitive information. | placeholder |
| `radio` | `string`, `number`, `bool`, `list(string)` | Yes | Radio buttons for selecting a single option with all choices visible at once. | placeholder |
| `slider` | `number` | No | Slider selection with min/max validation for numeric values. | placeholder |
| `switch` | `bool` | No | Toggle switch alternative for boolean parameters. | placeholder |
| `tag-select` | `list(string)` 7DAD | No | Default for list(string) parameters without options. | placeholder |
| `textarea` | `string` | No | Multi-line text input field for longer content. | placeholder |
| `dropdown` | `string`, `number` | Yes | Searchable dropdown list for choosing a single option from a list.<br>Default for `string` or `number` parameters with options. | placeholder |
| `input` | `string`, `number` | No | Standard single-line text input field.<br>Default for string/number parameters without options. | placeholder |
| `key-value` | `string` | No | For entering key-value pairs (as JSON). | placeholder |
| `multi-select` | `list(string)` | Yes | Select multiple items from a list with checkboxes. | placeholder |
| `password` | `string` | No | Masked input field for sensitive information. | placeholder |
| `radio` | `string`, `number`, `bool`, `list(string)` | Yes | Radio buttons for selecting a single option with all choices visible at once. | placeholder |
| `slider` | `number` | No | Slider selection with min/max validation for numeric values. | placeholder |
| `switch` | `bool` | No | Toggle switch alternative for boolean parameters. | placeholder |
| `tag-select` | `list(string)` | No | Default for list(string) parameters without options. | placeholder |
| `textarea` | `string` | No | Multi-line text input field for longer content. | placeholder |

### Form Type Examples

Expand Down
Loading
0