---
title: COVID-19 Screening Form
product: Survey Creator
description: A free template of a COVID-19 screening form. Easily modify the form in a no-code UI, copy its code and run the form in your JavaScript app with SurveyJS Form Library.
framework: jQuery
source: https://surveyjs.io/survey-creator/examples/covid-19-screening-form-template/jquery
index: https://surveyjs.io/survey-creator/examples/overview.md
---

# COVID-19 Screening Form (jQuery)

## Files

### `public/index.html`

```html
<!-- Uncomment the following lines to enable Ace Editor in the JSON Editor tab -->
<!-- 
<script src="https://unpkg.com/ace-builds/src-min-noconflict/ace.js"></script>
<script src="https://unpkg.com/ace-builds/src-min-noconflict/ext-searchbox.js"></script>
<script src="https://unpkg.com/ace-builds/src-min-noconflict/theme-clouds_midnight.js"></script>
-->

<div id="surveyCreatorContainer" style="position: absolute; height: 100%; width: 100%"></div>
```

### `src/index.css`

```css
/* You can add your custom CSS here. */
```

### `src/survey_json.js`

```js
export const surveyJSON = {
    "title": "COVID-19 Screening Form",
    "description": "All fields with an asterisk (*) are required fields and must be filled out in order to process the information in strict confidentiality.",
    "logo": "https://surveyjs.io/Content/Images/examples/logo.png",   
    "logoHeight": "60px",
    "headerView": "advanced",
    "questionErrorLocation": "bottom",
    "pages": [{
        "name": "patient-info",
        "title": "Patient Information",
        "elements": [{
            "type": "panel",
            "name": "full-name",
            "title": "Full name",
            "elements": [{
                "type": "text",
                "name": "first-name",
                "title": "First name",
                "isRequired": true,
                "maxLength": 25
            }, {
                "type": "text",
                "name": "last-name",
                "startWithNewLine": false,
                "title": "Last name",
                "isRequired": true,
                "maxLength": 25
            }]
        }, {
            "type": "panel",
            "name": "personal-info",
            "elements": [{
                "type": "text",
                "name": "ssn",
                "title": "Social Security number",
                "isRequired": true,
                "maxLength": 9,
                "validators": [
                    {
                        "type": "regex",
                        "text": "Your SSN must be a 9-digit number",
                        "regex": "^\\d{9}$"
                    }
                ]
            }, {
                "type": "text",
                "name": "birthdate",
                "startWithNewLine": false,
                "title": "Date of Birth",
                "isRequired": true,
                "inputType": "date"
            }]
        }]
    }, {
        "name": "symptoms-and-contacts",
        "title": "Current Symptoms",
        "elements": [{
            "type": "checkbox",
            "name": "symptoms",
            "title": "Have you experienced any of the following symptoms of COVID-19 within the last 48 hours?",
            "isRequired": true,
            "choices": [
                "Fever or chills",
                "New and persistent cough",
                "Shortness of breath or difficulty breathing",
                "Fatigue",
                "Muscle or body aches",
                "New loss of taste or smell",
                "Sore throat"
            ],
            "showNoneItem": true,
            "noneText": "No symptoms"
        }, {
            "type": "boolean",
            "name": "contacted-person-with-symptoms",
            "title": "Have you been in contact with anyone in the last 14 days who is experiencing these symptoms?"
        }, {
            "type": "radiogroup",
            "name": "contacted-covid-positive",
            "title": "Have you been in contact with anyone who has since tested positive for COVID-19?",
            "choices": ["Yes", "No", "Not sure"]
        }, {
            "type": "boolean",
            "name": "travelled",
            "title": "Have you travelled abroad in the last 14 days?"
        }, {
            "type": "text",
            "name": "travel-destination",
            "visibleIf": "travelled = true",
            "title": "Where did you go?"
        }, {
            "type": "boolean",
            "name": "tested-covid-positive",
            "title": "Have you tested positive for COVID-19 in the past 10 days?"
        }, {
            "type": "boolean",
            "name": "awaiting-covid-test",
            "title": "Are you currently awaiting results from a COVID-19 test?"
        }, {
            "type": "paneldynamic",
            "name": "emergency-contacts",
            "title": "Emergency Contacts",
            "description": "If possible, it's best to specify at least TWO emergency contacts.",
            "panelsState": "firstExpanded",
            "confirmDelete": true,
            "addPanelText": "Add a new contact person",
            "visibleIf": "(({tested-covid-positive} = true or {contacted-covid-positive} = 'Yes') or ({symptoms} notempty and {symptoms} notcontains 'none'))",
            "isRequired": true,
            "templateElements": [{
                "type": "text",
                "name": "emergency-first-name",
                "title": "First name"
            }, {
                "type": "text",
                "name": "emergency-last-name",
                "startWithNewLine": false,
                "title": "Last name"
            }, {
                "type": "text",
                "name": "emergency-relationship",
                "title": "Relationship"
            }, {
                "type": "text",
                "name": "emergency-phone",
                "startWithNewLine": false,
                "title": "Phone number",
                "inputType": "tel"
            }]
        }, {
            "type": "comment",
            "name": "additional-info",
            "title": "Additional information"
        }, {
            "type": "text",
            "name": "date",
            "title": "Date",
            "inputType": "date"
        },
        {
            "type": "signaturepad",
            "name": "signature",
            "startWithNewLine": false,
            "title": "Signature"
        }
        ]
    }],
    "completeText": "Submit",
    "questionsOnPageMode": "singlePage",
    "showPreviewBeforeComplete": true,
    "previewMode": "answeredQuestions",
    "widthMode": "static",
    "width": "1000px"
};
```

### `src/index.js`

```js
import { SurveyCreator } from "survey-creator-js";
import "survey-core/survey.i18n";
import "survey-creator-core/survey-creator-core.i18n";
import { surveyJSON } from "./survey_json";
import "survey-core/survey-core.css";
import "survey-creator-core/survey-creator-core.css";
import "./index.css";

import SurveyTheme from "survey-core/themes";
import { registerCreatorTheme } from "survey-creator-core";

registerCreatorTheme(SurveyTheme); // Add predefined Survey Creator UI themes

const creator = new SurveyCreator();
creator.JSON = surveyJSON;
creator.render("surveyCreatorContainer");
```

### `package.json`

```json
{
  "dependencies": {
    "jquery": "latest",
    "survey-core": "latest",
    "survey-js-ui": "latest",
    "survey-creator-core": "latest",
    "survey-creator-js": "latest"
  },
  "devDependencies": {
    "react-scripts": "latest"
  }
}
```

## Other Frameworks

- [Angular](https://surveyjs.io/survey-creator/examples/covid-19-screening-form-template/angular.md)
- [React](https://surveyjs.io/survey-creator/examples/covid-19-screening-form-template/reactjs.md)
- [Vue 3](https://surveyjs.io/survey-creator/examples/covid-19-screening-form-template/vue3js.md)
- [Vanilla JS](https://surveyjs.io/survey-creator/examples/covid-19-screening-form-template/vanillajs.md)
