How to use Field Embedding in REDCap Forms and Surveys

REDCap’s field embedding features allows users to customize their data entry forms and surveys by repositioning field elements. Users are able to embed existing fields into new locations on the same page. Fields can be embedded within grids or tables for a more compact and user-friendly form. This provides users with more control over the look and feel of their project instruments.

Field embedding can be used in both existing projects and in new projects. To embed a field, simply place the name of an existing variable inside curly brackets (i.e., {variable_name}) into a field label, section header, or choice label. Please note that field labels and field notes do not get carried over during field embedding. Only data entry boxes are carried over during field embedding. The original field will be hidden after it is relocated.

Example #1 in Online Designer:

 

Example #1 in Survey View:

 

How to Embed a Field in a REDCap Survey

  1. Navigate to the REDCap instrument you wish to add embedded fields to and create the field you wish to embed by clicking Add field.

    • The field must first be added to the REDCap form/survey before it can be embedded elsewhere.

    • Field labels and field notes are not necessary as they will be hidden when the field is embedded in another location.

  2. Insert the REDCap variable name of the field into curly brackets {}, and place it in the Field Label, Field Note, Section Header or Choice Label of another field within the same REDCap instrument.

    • Field embedding will not work across different instruments within a REDCap project.

    • When embedding fields in surveys, the embedded field must be on the same survey page as the original variable.

  3. Test all embedded fields before publishing to ensure they are appearing and operating as expected.

 

How to Access the History Widget and Fields Comments for an Embedded Field

For embedded fields, the following icons are hidden by default: Data History, Field Comments, and (if enabled) Missing Data Codes.

To display the icons:

  1. Ensure you have Designer permissions in the REDCap project.

  2. Find the embedded field in the Online Designer to which you’d like to add icons.

  3. Append :icons to the variable name inside the braces/curly brackets (e.g., {last_name:icons}).

  4. If the project is in production, Submit Changes for Review and await admin approval for the changes to be applied to production forms.

Tips and Considerations

  • The most common place to embed a field is in the Field Label of a Descriptive Field.

  • Use the rich text editor to customize the field to your liking.

  • If a field has branching logic, the branching logic will still apply when the field is embedded.

  • Record IDs cannot be embedded.

  • A Descriptive Field can be embedded inside another field. This would relocate the Descriptive Field’s label to the new location where it is embedded. Descriptive Field embedding is typically used for descriptive fields that contain branching logic.

Download the attached REDCap instrument zip and import into your REDCap project to see examples of how Field Embedding can be used as a means of customizing your forms and surveys.