User Tools

Site Tools


userdocs:redcap_usage:base:save_time_on_form

This is an old revision of the document!


Save time on form

You can automatically save the time spent on a form using two variables and some of the built in action tags.

The first variable [form_load_ts] stores the time of the first load of an instrument. If multiple forms need to have timing, each will need to have its own version of both of these variables. This variable needs the following action tags:

@NOW-SERVER @READONLY

The second variable [form_save_ts] stores the time of first save of an instrument. Note that the calculation uses the form complete status of the form that it lives on. This can be used to prevent a save time until the form is complete. This is most often useful on a survey that will not be complete until all required fields are specified.

@CALCDATE(if(([form_1_complete] >= 0 and [form_save_ts] = ''), 'now', [form_save_ts]), 0, 'd')
userdocs/redcap_usage/base/save_time_on_form.1774640207.txt.gz · Last modified: by babbagej

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki