jhu-redcap / Multi_Column_Menu

This External Module adds the ability to use the @COLUMNS action tag. This tag will take a checkbox or radio button field and split the choices into the specified number of columns.
MIT License
0 stars 0 forks source link
redcap redcap-external-module redcap-repo

<!DOCTYPE html>

Documentation

@COLUMNS Action Tag

Overview:

The @COLUMNS action tag takes a single integer parameter and splits a set of options (checkboxes and/or radio buttons) into the specified number of columns.

  • Compatible with enhanced radio buttons and checkboxes.
  • Best when used with "left" alignment (LH or LV).
  • When applicable, test on portable devices (smartphone and/or small tablet) to ensure layout is acceptable. If necessary, reduce the number of columns to acheive the desired presentation.
  • NOTE: The @COLUMNS action tag is not compatible with the REDCap Mobile App.

Usage:

Action Tag Section: @COLUMNS=5

Specifications:

  • The sorting is driven by the field alignment:
    • If a Vertical field alignment (LV or RV) is chosen, the options will be sorted vertically (first column will contain options 1, 2, 3…).
    • If a Horizontal field alignment (LH or RH) is chosen, the options will be sorted horizontally (first row will contain options 1, 2, 3…).
  • The width of the columns is driven by the length of the labels.
  • It is recommended that careful testing is done to ensure the menu labels and number of columns work well together and present the desired layout.
  • Using a large number of columns may have unintended consequences in regards to the page width / layout.
  • Works with field embedding.
  • When downloading the instrument as a PDF, you MUST use the web browser "Save as PDF” or "Print to PDF" options. When using REDCap's built-in "Download PDF" feature, the @COLUMNS action tag is ignored.

Example:

Field Configuration:

Add action tag with desired number of columns.

Field Configuration

Resulting Output (checkboxes):

Note how options are organized vertically based on the selected "vertical" alignment.

Checkboxes

Resulting Output (radio buttons):

Note how options are organized horizontally based on the selected "horizontal" alignment.

Radio Buttons


Johns Hopkins University, October 2024
multi_column_menu_v2.1.1

isSuperUser()) { echo '

Testing

This section provides two resources for administrators to test the functionality of this External Module:

  • REDCap Data Dictionary: Use this file to create a new project in REDCap. It allows you to test the compatibility of most REDCap action tags by adding data to records and saving the results.
  • REDCap Form Zip File: This file is for importing a form into an existing project. It helps test how the module interacts with forms and action tags within existing projects.
'; } ?>