DatumForms.
Join the panel Sign in Create a survey

DATUMFORMS DOCUMENTATION

Add custom JavaScript or CSS to a project

Create a reusable custom resource and enable it for the intended project.

For researchers and administrators

Updated 15 November 2026

On this page

Before you start

Use administrator access and review the code in a sample project first. Store private integration keys on your server. Participant-side lookups use explicitly restricted read-only keys.

Open: Your project → Project Settings → Custom code.

Steps

  1. Choose Create new Codes, or open View all Codes and Edit an existing resource.
  2. Enter the code title. Choose JS or CSS, then Code for pasted source or Link for an HTTP/HTTPS resource URL.
  3. Enter the source or link and choose Save.
  4. Open View all Codes and check the resource’s active control. Enable only the reviewed resource intended for this project.
  5. Open the participant questionnaire and test its effect on desktop and mobile. For offline field collection, refresh required resources while connected and test the actual device without connectivity.

Check the result

The active resource runs or styles the intended project view without changing question identities or saved answer meanings. API automation uses resources.get, resources.save and resources.delete with project-wide resource permissions.

Troubleshooting

If the resource is not applied, check its active state, language, Code/Link choice and URL. A newly saved resource must be enabled deliberately. For lookup failures, check the key’s group/question restrictions and pagination rather than widening access.

Next steps

Create a read-only lookup key or manage resources through the API.

Need help with this task? Contact DatumForms. Include the article URL and the step you reached.

Tracking preferences

Essential functions stay on. Choose whether to allow optional tracking on this website. You can change your choices in the footer at any time.

Read our privacy policy