Luke Stevens, Murdoch Children's Research Institute https://www.mcri.edu.au
https://github.com/lsgs/redcap-choice-columns
Tag radio or checkbox fields with the action tag @CHOICE-COLUMNS=?
to specify the number of columns the choices will be displayed in.
Notes:
- The tag is ignored for fields other than radio and checkbox.
- The tag is ignored for radio and checkbox fields that are part of a matrix.
- Enhanced radio buttons and checkboxes are supported.
- Specify an integer in the range 1-99 for the number of columns. Any other value will cause the tag to be ignored and the field display default behaviour.
- Piping into the action tag is supported, but only on page load. It is not dynamic within a page (i.e. is similar to other tags like
@HIDECHOICE
and@IF
).
- Horizontal: Choices will be displayed in columns with choices listed across then down.
- Vertical: Choices will be displayed in columns with choices listed down then across.
Note: down then across filling for fields with vertical alignment means that the specified column count may not be fully filled.
- Left: Recommended. Choices occupy the full width of the form container, with the field label above.
- Right: Choices occupy space to the right of the field label. Usually unsuitable with higher column counts.
The module is designed to support re-rendering following language changes, including between left-to-right and right-to-left languages.
L-T-R | < | - | > | R-T-L | ||
---|---|---|---|---|---|---|
Choice1 | Choice4 | 4eciohC | 1eciohC | |||
Choice2 | Choice5 | 5eciohC | 2eciohC | |||
Choice3 | 3eciohC |
L-T-R | < | - | > | R-T-L | ||
---|---|---|---|---|---|---|
Choice1 | Choice2 | 2eciohC | 1eciohC | |||
Choice3 | Choice4 | 4eciohC | 3eciohC | |||
Choice5 | 5eciohC |
https://redcap.link/em-choice-columns