Create a Nettskjema for collecting sensitive data

This guide walks you through the process of creating a web-form or questionnaire for sensitive data. 

Nettskjema is a tool for designing and managing data collection using online forms and surveys. The secure Nettskjema service is available on UiO's web pages, it is used through a web browser and should works on all platforms with all popular browsers.

Submissions from a Nettskjema questionnaire can then be delivered securely (fully encrypted) to your project area within TSD 2.0. Read the Nettskjema disclaimer Before you start.

Create a Nettskjema for sensitive data

Step 1: Getting access

In order to use Nettskjema as an integrated TSD 2.0 service you need to have a TSD-project running. See "Getting Started with TSD".

There are currently two ways to access the Nettskjema-application: 

  1. A valid username and password at the University of Oslo (employed or student). You already have access to Nettskjema and can start making forms right away.
  2. For TSD-users that are not affiliated with UiO we can grant access to Nettskjema through IDporten or FEIDE.  

Step 2: Consider using TSD-Data-Loader

TSD projects that are using Nettskjema can now get a more streamlined and automatic data flow. This is a system tailored for research projects using Nettskjema in their data collection. Read more about this solution and how to get it installed to your project here. Make sure you follow the requirements specified when starting to make forms.

Step 3: Construct the form 

Construct the form as you wish in the standard Nettskjema service. This means that you include the form elements, design the questions, answer options etc. as it should appear to the respondent. Have a look at the user guide and best practice examples for using different elements/fields in Nettskjema for research. Here you can play with the functionality and send pilot/test submission to colleagues etc. 

Important note for piloting and testing outside TSD:

If piloting the form in the standard Nettskjema service (before it is activated in a TSD project), no submissions with sensitive data should be registered. For security reasons piloting should only contain dummy data. These data will be deleted when the form is activated for TSD use.

If you need help / technical assistance when making the actual form, send a request to

Step 4: Make a predefined codebook

You can activate the codebook function under advanced settings in Nettskjema. Fill in the desired variables and scores (read about codebook here).

There are a few requirements for successful implementation:

  • The form should be pre coded using the Nettskjema codebook functionality This is to ensure optimal data flow to TSD and correctly import to applications like SPSS, Stata, Excel, R etc. It is good practice to make your own variable-names in the codebook and avoid using the automatic feature in Nettskjemas codebook to generate variable-names as var1, var2, var3 etc. 
  • Maximum 999 variables per form allowed. This means not having more than 999 questions in a single Nettskjema. 
  • Variable names in the codebook can be up to 60 characters long, and the first character must be a letter. Subsequent characters can be a combination of letters and numbers (no blank spaces). Variable names must also be unique within the same form.
  • Variable names defined in the Nettskjema codebook must not have obsolete (illegal) characters:
‘æ’, ’ø’, ’å’, ’;’, ’?’, ‘(’, ‘)’, ‘!’, ‘@’, ‘#’, ‘$’, ‘%’, ‘^’, 
‘*’, ‘+’, ‘=’, ‘[‘, ’], ‘<’, ‘>’, ‘~’, ‘`’, ‘|’, ‘-’, ‘.’, ‘:’

Step 5: Activate form for TSD use

NB! Make sure that the form is in its final version before TSD activation (see best practice tips below).

It is highly advisable that you do not edit the questions and answer options at this stage, in order to keep a consistent dataset and be able to compile the answers into a single file for further analysis (e.g. SPSS, Excel or Stata). The form will be routinely locked for editing during activation (it will automatically lock when the first submission is sendt to the form).

When you are finished designing the questionnaire, the next step is to activate it for delivering the answers to TSD. This means that the form needs to be set up with your projects unique encryption key. The key will be generated by the TSD service and the form activation can only be done by authorized TSD personnel.

Activating the form

Open your form in Nettskjema and make a note of your new forms ID. This is the number at the end of the web-address field visible in your browser.

Check-list before activation

  • The form is considered the final version.

  • I have used the codebook feature in Nettskjema and all questions and answer options are properly coded. The codebook should be complete, no blank fields.

  • I have used radio buttons (or dropdowns) for questions with fixed answer options (when only one answer should be selected). Not check-boxes (see examples).
  • There are no submissions left in the Nettskjema application for this particular form. Test submissions in the results tab should be deleted before activation.  

When you are ready, fill out the following request for activation:

  • Activation of TSD-Nettskjema
    • You will get a notice by email when the activation is done by TSD-drift.
  • At you can make your questionnaire accessible either as a link on a web page or by inviting respondents by e-mail (see the tab «collecting responses» in the Nettskjema application). 

Step 6: Privacy for the respondent – important for all users of TSD and Nettskjema

Almost all TSD Nettskjema usage is meant to be used for collecting sensitive information. This implies that the respondents are sometimes directly identifiable in the response data once decrypted, especially if using minID or BankID etc. for authentication.

Your research project has the responsibility of washing the data so that there is no use of names, IDs or other data that is not essential for the research.

Every project should have one or a few people who decrypt responses, wash the data by inserting a «responsecode» (løpenummer) and putting the codebook (koplingsnøkkel) matching pID and the responsecode in a safe place for limitied access. TSD recommends the pxx/home/area of the data manager who decrypts the data.

If the codebook is final TSD can lock it down further so that none in the actual project can access the codebook. For questions, please contact

TSD does not provide this service in an automated fashion, but we might have the time to assist you on a per hour fee.

Step 7: Locate and verify test submission

When a new form is activated for TSD it is very important that you verify (test) that submissions reaches your project area in TSD and that the associated files decrypt as they should. This must be done before using the questionnaire on real respondents with real sensitive data. 

In addition to checking that the result files are as you expected, this is also a verification that your key pair is valid and answers are delivered correctly to your project area. 

This is how you do it:

  • Send a test submission (dummy answer) from your form.
  • Make a note of the Nettskjema form ID and the answer ID and make sure it corresponds to the test submission. The latter is visible on the Nettskjema result page for the form. 
  • Locate the test submission in your TSD secure storage area as described below:
  1. Log in to your TSD project server (see user guide for instructions on how to log in) and set up a few useful shortcuts to folders, if you haven’t done it already. We suggest that you set up shortcuts to your data durable, fx (the folder for file exchange) and home directory as described here. Make the shortcuts on your TSD desktop so that it looks like something like this:

  1. Locate the test answer. You will find your Nettskjema submissions under data/durable/nettskjema-submissions. Double click on your durable shortcut and navigate to the folder data/durable/nettskjema-submissions/long number/formID.

Your file browser containing the nettskjema submissions should now look something like this:

The example in the screenshot above has six forms (each with an unique formID in its folder name). Submissions from each form will be collected under these respective folders. The files contained in these folders are currently encrypted and needs to be decrypted before you can inspect the content. The file you need to inspect is the one with «.csv» in its filename. 

If your test file has not yet reached the Nettskjema submissions folder, see troubleshooting for a possible solution.

  1. Decrypt the test answer: There are currently two programs in TSD to handle the decryption; Kleopatra and GPA. This example uses Kleopatra. If this is the first time you do this procedure you also need you to check whether the private key is imported into Kleopatra. Open Kleopatra from the Windows start menu in TSD. If your key is already imported it looks like this:

If no key is visible here you need to import your projects certificate (secret key). Click «Import Certificates» in the Kleopatra toolbar. Normally you will find this under data > durable > gpg-keys/p<xx>current-private-key/. Choose the private/secret key and open. When imported you can close Kleopatra. 

Using the shortcuts you made on the Desktop, navigate to data>durable and make a new folder called «nettskjema-test». When storing data in TSD it is important that you always store on data>durable or your home directory. These are included in the backup cycle. The Desktop or C:drive is not intended for storing research data. 

Go to your Nettskjema area (durable>nettskjema-submissions>long number>FormID) and select the test file with .csv in its name (i.e. 1290582.csv.asc). Right click the file and choose «Decrypt and Verify». On the next dialog select «Create all output files in a single folder». 

Click the little blue button to the lower right in order to specify an output folder. Then select the folder «nettskjema-test» that you made on data>durable and press «Decrypt/Verify». 

Now there should be a decrypted file in the folder «nettskjema-test» on data>durable. The next step is to open it and inspect the content.

  1. Open the test answer: This is a tab-delimited file (.csv) and can be imported to Excel, SPSS, Stata, R etc. For this example we chose Excel.
    1. Open Excel from the Windows start menu in TSD. Press the Data tab and the button «From Text». Navigate to your test file and import. In step 1 of the Wizard choose «Delimited» and Unicode (UTF-8). Then «Next»,  select tab as delimiter and «Finish». 
      Note: If you double click on the Excel-file and open it directly, the above procedure will not work and you will not see the Norwegian characters in the file.

You should now see a table with the question (or the variables you defined if used the codebook function in Nettskjema) on the first line and the test answer on the second line.

Manage your Nettskjema data in TSD

Further processing and analysis of the results from secure Nettskjema should primarily be conducted inside of TSD. If needed to export data out of TSD, the files should be properly de-identified or anonymized before exporting.

If the files contain sensitive data they must be encrypted before export. You are free to organize the data as you wish within TSD, but remember to always store your files securely on data>durable or in the home directory. 

In order to get an initial overview during data collection or prepare a final data set for analysis in e.g. Excel or SPSS you may what to produce a summary table containing all the answers. The following services can be helpful:

TSD Data Loader 

The Data Loader is a tool developed by TSD providing a more automated and streamlined workflow for managing the Nettskjema submissions. A typical use case is a project with multiple forms in production generating a lot of answers and the need to check these on a regular basis.TSD Data Loader automatically decrypts and moves all the submissions to a proper folder structure within the project's secure storage area. Every night it collects all new answers into a complete summary file; namely a comma separated file (.csv), that can be imported into Excel, SPSS, STATA or R for further data processing and analysis.

The Data Loader system needs to be installed by TSD technicians based on an assessment of the project need 

Read more about TSD Data Loader here.

Best practice

  • When the form is activated and in production it is good practice to make print of the Nettskjema form (as PDF or regular paper print) and store it as a reference. Open your form in the Nettskjema application, press the «View» tab and print the content.  
  • If the codebook functionality is used in Nettskjema, download the codebook and store it together with your project files as a reference. See the codebook tab in Nettskjema. 
  • When the form is final, you are done editing/testing etc. and have set it up for delivering submissions to your TSD project, it is considered to be in production. The form can then be locked for editing. The rationale here is to keep data-integrity, prevent changes in the form and the associated dataset as long as it is receiving answers from your respondents.  
  • If you need to do major revisions of the Nettskjema form (of instance in a later follow up study), it is recommended to make a copy of the «old» form in Nettskjema. This way you will get a new formID, and the submissions will end up in a new directory within your project. 
  • See best practice examples for using different elements/fields in Nettskjema for research purposes

Troubleshooting and Q-A

Q: I cant find the Nettskjema submissions

A: If you cant find any answers in your nettskjema-submissions folder there may be a problem with the projects encryption key or that there is scheduled maintenance of the system. Check the service log to see if any issues have been reported.

If the problem is not reported in the service log, contact TSD support for assistance. 

Q: Can I run a pilot in the standard Nettskjema service before my form is activated by TSD?

A: Yes, but only with fake answers (dummy registrations) that are not sensitive. This can be done as a minipilot by sending the form to a small sample (4-5 respondents) from the target group or a few research associates. Ask them to fill out randomly, make notes if anything was unclear in the questions/answers presented and how long time they spent filling in the form. When  they are done, delete the answers in Nettskjema and adjust the form based on the feedback you get from the respondents.

Q: I need some help with the functionality in the Nettskjema web application

A: Have a look at the Nettskjema users guide. Most functionality (and how to use it) is presented there. This is in general not a case for the TSD support team. If you can't find an answer in the Nettskjema documentation, send your request to

Q: My form is locked for editing and I need to do changes. It is in production, activated against TSD and have received answers

A: The locking is a safety mechanism to prevent accidental changes to the form when it is in production. However, sometimes users discover errors that needs to be changed after the form is locked for editing. If the data producing elements in the existing form (such as question and and answer options) are changed when the form is in production it may distort the final dataset. For example, the content of the questions, variable names or content of answers options should not be changed after the form is activated. 

If you need to do edits, the following two approaches are safe to do, as the original form and associated data will remain untouched:

  1. Make a copy of the original form in Nettskjema. Do the edits, update the codebook and activate it, following the standard routine (described in step 7 above). The new form will then deliver submissions to another folder representing the new formID. 
  2. Make a new «supplementary form» with the extra questions you forgot to put in the original form. Include the same participant-ID field as the original form. Add the new questions and define appropriate variables in the codebook. The rationale here is to make a new form with extra variables that can be joined with the original form when preparing the final data set (in e.g. SPSS). The supplementary form needs to be activated for TSD use following the standard routine.

Q: I sent a few test answers to TSD that should be deleted

A: When the test answers are sendt to your TSD-project it is advisable not to delete them. Leave the files as they are in their respective folders (sns>import>etc). It is better practice to take note of their answerIDs and remove the raws containing the test answers when the data collection for this particular form is completed. This means that you treat them as original data (not to be touched) and rather remove them from the final dataset when preparing it for analysis (in e.g. SPSS, Excel or STATA). This practice also applies if you have Data Loader installed in your project. 

Q: A subject chooses to withdraw informed consent

A: If a respondent withdraws from the research study it is the projects responsibility to remove the data from this particular person. TSD can assist in running new fresh backup after you have deleted the data so that traces are not in backup etc, but we do not touch your data directly.

Tips and tricks

Use Nettskjema to upload files

In addition to serving regular questionnaires or other data capture forms, the Nettskjema system can also function as a simple file uploader. The uploaded file will then be fully encrypted with your projects unique public key and delivered directly to your TSD project. Currently the file size limit is 30 MB per file. 

Making a form that can upload files as attachment

  • Create a new form (or use an earlier form). 
  • There is a custom field in the Nettskjema form builder labelled "Attachment" for this purpose. Add it to your form and give the field a question text (e.g. «Upload your file») and a short explanation. 
  • Its possible to upload one attachment for one field. 
  • All file types that are currently accepted by the e-mail system at the University can be uploaded as attachment (See list and rules for e-mail attachments at the University). However, we highly recommend to compress the files into a standard Zip format or something similar before uploading. 

Using syntax files in SPSS

If you import the .csv datafile from Nettskjema to SPSS often you can save the syntax generated by SPSS and reuse it when needed. You can also download the Nettskjema codebook as SPSS-syntax to label variabels and values. See example syntax for import to SPSS bellow.

Converting files with StatTransfer

StatTransfer is a small and practical tool for converting among different file-formats for statical purposes. When it comes to the delimited result files (.cvs) generated by Nettskjema this can also be useful for swift conversion to e.g. Stata, Excel, SPSS, R, SAS and Matlab. Note that StatTransfer does not out of the box produce a summary output based on multiple .cvs files in the Nettskjema import directory of your TSD-project. For this you need to implement the TSD data loader first. StatTransfer can then be an option to convert the resulting comma separated file to the format of choice (how to get started with StatTransfer file conversions).

For more guidance, tips and tricks, see the Nettskjema users guide (in Norwegian)

Change the forms address 

If you have forms that are set with permissions that «Everybody» may answer (see «Permissions» in Nettskjema), it is a good idea to give the form a custom URL). You may name the address something meaningful ( See tab «Collect responses» - > and click «Change URL».

This is an advantage if you need to distribute the web address (e.g. by a link from a web page) and later need to replace this with another form. Then you can then re-use this unique web address in a new form by deleting the name from the old form and assign to the new. The new form must of course be activated for your TSD project following standard routines before real use.

Did you find what you were looking for?
Published Feb. 17, 2017 1:23 PM - Last modified Apr. 8, 2019 10:04 AM