---
title: Event Registration Form
product: PDF Generator
description: Get a printable event registration form in PDF. Create editable or prefilled student event registration forms with SurveyJS PDF Generator.
framework: Vue 3
source: https://surveyjs.io/pdf-generator/examples/pdf-education-event-registration-form-template/vue3js
index: https://surveyjs.io/pdf-generator/examples/overview.md
---

# Event Registration Form (Vue 3)

## Files

### `public/index.html`

```html
<div style="display: flex;">
    <div id="app" style="flex: 1 1 0%; height: 100%; min-width: 0;"></div>
    <div id="pdf-preview" style="flex: 0.7 0.7 0%; display: none">
        <embed id="pdf-preview-frame" type="application/pdf" style="width:100%; height:100%;" />
    </div>
</div>
```

### `src/App.vue`

```html
<template>
    <SurveyComponent :model="survey" />
</template>
<script setup lang="ts">
    import { Model } from "survey-core";
    import { SurveyComponent } from "survey-vue3-ui";
    import "survey-core/survey-core.min.css";
    import { SurveyPDF } from "survey-pdf";
    import "./index.css";
    import { json } from "./json";

    function createSurveyPdfModel (surveyModel) {
        const surveyPDF = new SurveyPDF(json);
        if (surveyModel) {
            surveyPDF.data = surveyModel.data;
            surveyPDF.locale = surveyModel.locale;
            
            
        }
        surveyPDF.questionsOnPageMode = "standard";
        return surveyPDF;
    }
    function saveSurveyToPdf (filename, surveyModel) {
        const pdfDoc = createSurveyPdfModel(surveyModel);
        if (!pdfDoc) return;
    
        pdfDoc.save(filename);
    }
    
    const previewDiv = document.getElementById("pdf-preview");
    const previewEmbed = document.getElementById("pdf-preview-frame");
    let pdfBlobUrl;
    
    function showPdfPreview(surveyModel) {
        if (!previewDiv || !previewEmbed) return;
    
        const pdfDoc = createSurveyPdfModel(surveyModel);
        if (!pdfDoc) return;
    
        pdfDoc.raw("blob").then((blob) => {
            if (pdfBlobUrl) {
                URL.revokeObjectURL(pdfBlobUrl);
            }
            pdfBlobUrl = URL.createObjectURL(blob);
            previewEmbed.setAttribute("src", pdfBlobUrl);
            previewDiv.style.display = "block";
        });
    }
    
    function previewPdf(surveyModel) {
        if (!previewDiv) return;
    
        if (previewDiv.style.display !== "none") {
            previewDiv.style.display = "none";
            return;
        }
    
        showPdfPreview(surveyModel);
    }
    
    const survey = new Model(json);
    survey.showCompleteButton = false;
    survey.navigationButtonsLocation = "topBottom";
    survey.addNavigationItem({
        id: "survey_save_as_file",
        title: "Download PDF",
        action: () => {
            saveSurveyToPdf("surveyResult.pdf", survey);
        }
    });
    survey.addNavigationItem({
        id: "survey_pdf_preview",
        title: "Preview PDF",
        visible: window.navigator.pdfViewerEnabled,
        action: () => {
            previewPdf(survey);
        }
    });
</script>
```

### `src/index.css`

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

### `src/json.ts`

```ts
export const json = {
  "title": "Event Registration Form",
  "pages": [
    {
      "name": "important-info",
      "title": "Important Information",
      "description": "Read the following information carefully and confirm that you understand it.",
      "elements": [
        {
          "type": "panel",
          "name": "important-info-panel",
          "elements": [
            {
              "type": "html",
              "name": "warning",
              "html": "<p><strong>Event Registration</strong></p><p>Events, activities, and meetings may not be registered more than four months in advance of the current date.</p><p>Recurring events with the same activities, equipment, and location may be registered using this form if they occur within four months of the current date.</p><p>Requests are processed during business hours only. Minimum submission timeframes are listed below. Complex events or events with large attendance should be submitted as early as possible.</p><p>Meetings requiring room or club space hire: 2 business days, subject to availability.</p><p>Event registration including outdoor or plaza bookings: 5 business days, subject to availability.</p><p>Equipment requiring staff assistance, for example large screens or BBQ delivery: 10 business days.</p><p>Sale of food prepared by your group: 10 business days.</p><p>Events with attendance over 150 guests: 10 business days plus 2 business days for each additional 50 guests.</p><p>Events involving intrastate or interstate travel, for example camping or excursions: 15 business days.</p><p>Specialized or high risk activities, for example rock climbing or off road mountain biking: 15 business days.</p><p>Events submitted without sufficient notice will not be approved. If any event details change, including location, equipment, or room hire, submit a new Event Registration Form within the required notice period.</p>"
            }
          ]
        },
        {
          "type": "boolean",
          "name": "intro-consent",
          "title": "I confirm that I have read and understand the information above.",
          "displayMode": "checkbox"
        }
      ]
    },
    {
      "name": "general-details",
      "title": "General Details",
      "description": "Provide the contact details of the event or activity manager.",
      "elements": [
        {
          "type": "text",
          "name": "name-host",
          "title": "Name of Host or Organization",
          "description": "Use the full name. Acronyms are not accepted."
        },
        {
          "type": "panel",
          "name": "panel-host",
          "title": "Host or Organization Email",
          "elements": [
            {
              "type": "text",
              "name": "host-org-email",
              "title": "Email address",
              "inputType": "email",
              "autocomplete": "email"
            },
            {
              "type": "text",
              "name": "confirm_email",
              "startWithNewLine": false,
              "title": "Confirm email address",
              "validators": [
                {
                  "type": "expression",
                  "text": "The confirmation email must match the email entered above.",
                  "expression": "{confirm_email}={host-org-email}"
                }
              ],
              "inputType": "email",
              "autocomplete": "email"
            }
          ]
        },
        {
          "type": "panel",
          "name": "panel-manager",
          "title": "Event or Activity Manager",
          "elements": [
            {
              "type": "text",
              "name": "first-name",
              "title": "First name"
            },
            {
              "type": "text",
              "name": "last-name",
              "startWithNewLine": false,
              "title": "Last name"
            }
          ]
        },
        {
          "type": "panel",
          "name": "panel-manger-email",
          "title": "Event or Activity Manager Email",
          "elements": [
            {
              "type": "text",
              "name": "enter-email-manager",
              "title": "Email address",
              "inputType": "email",
              "autocomplete": "email"
            },
            {
              "type": "text",
              "name": "confirm-email-manager",
              "startWithNewLine": false,
              "title": "Confirm email address",
              "validators": [
                {
                  "type": "expression",
                  "text": "The confirmation email must match the email entered above.",
                  "expression": "{confirm-email-manager}={enter-email-manager}"
                }
              ],
              "inputType": "email",
              "autocomplete": "email"
            }
          ]
        },
        {
          "type": "panel",
          "name": "phone-student-number",
          "elements": [
            {
              "type": "text",
              "name": "phone",
              "title": "Event or Activity Manager Mobile Number",
              "maskType": "pattern",
              "maskSettings": {
                "pattern": "+1(999)-999-99-99"
              }
            },
            {
              "type": "text",
              "name": "student-number",
              "startWithNewLine": false,
              "title": "Student Number",
              "maskType": "pattern",
              "maskSettings": {
                "pattern": "aa999999"
              }
            },
            {
              "type": "radiogroup",
              "name": "presence",
              "title": "Will the event or activity manager listed above be present for the entire event?",
              "choices": [
                "Yes",
                "No"
              ]
            }
          ]
        }
      ]
    },
    {
      "name": "activity-details",
      "title": "Event or Activity Details",
      "description": "Provide details about the event, activity, or meeting.",
      "elements": [
        {
          "type": "radiogroup",
          "name": "name-event",
          "title": "Type of Event",
          "choices": [
            "Orientation Week",
            "Homecoming",
            "Graduation Ceremony",
            "Fresher Ball",
            "Sports Day",
            "Cultural Festival",
            "Academic Conference",
            "Career Fair",
            "Charity Event",
            "Art Exhibition"
          ],
          "showOtherItem": true,
          "otherText": "Other",
          "colCount": 2
        },
        {
          "type": "text",
          "name": "title-event",
          "title": "Title of Event or Activity",
          "maxLength": 50
        },
        {
          "type": "text",
          "name": "location",
          "title": "Event Location"
        },
        {
          "type": "radiogroup",
          "name": "attendance",
          "title": "Expected Attendance",
          "choices": [
            "1-50",
            "51-100",
            "101-200",
            "201-500",
            "More than 500"
          ],
          "colCount": 2
        },
        {
          "type": "comment",
          "name": "description",
          "title": "Description of the Event or Activity",
          "description": "Describe the purpose of the event and the planned activities.",
          "maxLength": 500,
          "autoGrow": true
        },
        {
          "type": "text",
          "name": "url",
          "title": "Event Web or Social Media Link, if applicable",
          "description": "For example a social media event page or ticket page. Leave blank if none.",
          "inputType": "url"
        },
        {
          "type": "paneldynamic",
          "name": "dates-times",
          "title": "Event Dates and Times",
          "panelCount": 3,
          "panelsState": "firstExpanded",
          "templateTitle": "Schedule {panelIndex}",
          "templateElements": [
            {
              "type": "text",
              "name": "date",
              "title": "Date",
              "inputType": "date",
              "minWidth": "auto"
            },
            {
              "type": "text",
              "name": "start-time",
              "title": "Start time",
              "inputType": "time",
              "startWithNewLine": false,
              "minWidth": "auto"
            },
            {
              "type": "text",
              "name": "end-time",
              "title": "End time",
              "inputType": "time",
              "startWithNewLine": false,
              "minWidth": "auto"
            }
          ]
        },
        {
          "type": "checkbox",
          "name": "requirements",
          "title": "Select any requirements for this activity.",
          "choices": [
            "I need to book a room or space",
            "I need to hire equipment",
            "I would like the university to promote this activity"
          ]
        },
        {
          "type": "boolean",
          "name": "acknowledgement",
          "title": "I confirm that I do not require equipment hire, room booking, or promotion. I understand that a new form must be submitted if my requirements change.",
          "description": "Select this only if none of the requirements above apply.",
          "displayMode": "checkbox"
        }
      ]
    },   
    {
      "name": "compliance-panel",
      "title": "Event Setup and Compliance Information",
      "description": "Provide information about event preparation and compliance requirements.",
      "elements": [
        {
          "type": "radiogroup",
          "name": "alcohol",
          "title": "Will alcohol be served at the event?",
          "choices": [
            "Yes",
            "No"
          ]
        },
        {
          "type": "panel",
          "name": "alcohol-statement",
          "title": "Alcohol Service Information",
          "description": "Complete this section if alcohol will be served.",
          "elements": [
            {
              "type": "html",
              "name": "statement-contents",
              "html": "<em>Outdoor events with alcohol must use a tent with sides. Events aimed at undergraduate students must not mention alcohol in advertising materials. Advertising may include the phrase Valid ID Required.</em>"
            },
            {
              "type": "boolean",
              "name": "alcohol-statement-confirmation",
              "title": "I confirm that I have read and understand the alcohol service rules.",
              "displayMode": "checkbox"
            }
          ]
        },
        {
          "type": "radiogroup",
          "name": "food",
          "title": "Will food be served at the event?",
          "choices": [
            "Yes",
            "No"
          ]
        },
        {
          "type": "panel",
          "name": "snacks-statement",
          "title": "Snack and Non Alcoholic Beverage Reminder",
          "description": "Complete this section if alcohol will be served. Snacks and non alcoholic beverages must be provided.",
          "elements": [
            {
              "type": "html",
              "name": "snacks-statement-contents",
              "html": "<em>Snacks and non alcoholic beverages must be served if alcohol is served.</em>"
            },
            {
              "type": "boolean",
              "name": "snacks-statement-confirmation",
              "title": "I confirm that I have read and understand this requirement.",
              "displayMode": "checkbox"
            }
          ]
        },
        {
          "type": "radiogroup",
          "name": "speaker-candidate",
          "title": "Will the event include a speaker who is a candidate for political office?",
          "choices": [
            "Yes",
            "No"
          ]
        },
        {
          "type": "radiogroup",
          "name": "against-candidate",
          "title": "Is the event expected to include statements supporting or opposing a political candidate or office holder?",
          "choices": [
            "Yes",
            "No"
          ]
        },
        {
          "type": "radiogroup",
          "name": "speaker",
          "title": "Will the event include another external speaker, entertainer, or presenter?",
          "choices": [
            "Yes",
            "No"
          ]
        },
        {
          "type": "text",
          "name": "name-speaker",
          "title": "Name of speaker, entertainer, or presenter, if applicable"
        },
        {
          "type": "radiogroup",
          "name": "amplified-music",
          "title": "Will the event include live or amplified music?",
          "choices": [
            "Yes",
            "No"
          ]
        },
        {
          "type": "panel",
          "name": "amplified-sound-statement",
          "title": "Amplified Sound Permit Information",
          "description": "Complete this section if the event includes amplified or live music.",
          "elements": [
            {
              "type": "html",
              "name": "permit",
              "html": "<p><strong>If the event is held outdoors, an Amplified Sound Permit from the local police department may be required.</strong></p><p>You will need an approved copy of this registration form to obtain the permit.</p>"
            },
            {
              "type": "boolean",
              "name": "amplified-sound-statement-confirmation",
              "title": "I confirm that I have read and understand the amplified sound permit requirements.",
              "displayMode": "checkbox"
            }
          ]
        },
        {
          "type": "radiogroup",
          "name": "displays",
          "title": "Will the event include signage or promotional displays?",
          "choices": [
            "Yes",
            "No"
          ]
        },
        {
          "type": "html",
          "name": "promotional-displays-statement",
          "title": "Rules for Signage and Promotional Displays",
          "html": "<em>No signage or promotional displays related to events may be attached to university buildings. All signage and promotional displays must be approved in advance as part of the event registration.</em>"
        },
        {
          "type": "comment",
          "name": "promotional-displays-contents",
          "title": "Provide details of signage or promotional displays, if applicable",
          "maxLength": 300
        },
        {
          "type": "radiogroup",
          "name": "insurance",
          "title": "Have the insurance requirements for this event been met?",
          "choices": [
            "Yes",
            "No"
          ]
        }
      ]
    },
    {
      "name": "declaration",
      "title": "Declaration",
      "elements": [
        {
          "type": "html",
          "name": "declaration-contents",
          "html": "<p>As the event manager, I agree to ensure that all applicable guidelines and health and safety requirements are followed during this event. I understand that late changes to equipment or room requirements may not be accommodated.</p>"
        },
        {
          "type": "boolean",
          "name": "declaration-confirmation",
          "title": "I confirm that I have read, understood, and agree to the declaration above.",
          "displayMode": "checkbox"
        }
      ]
    }
  ],
  "checkErrorsMode": "onValueChanged",
  "questionsOnPageMode": "singlePage",
  "headerView": "advanced"
};
```

### `src/main.ts`

```ts
import { createApp } from "vue";
import App from "./App.vue";

const app = createApp(App);
app.mount("#app");
```

### `src/shims-vue.d.ts`

```ts
/* eslint-disable */
declare module "*.vue" {
    import type { DefineComponent } from "vue"
    const component: DefineComponent<{}, {}, any>
    export default component
}
```

### `src/theme.ts`

```ts
export const themeJson = {};
```

### `.eslintrc.js`

```js
module.exports = {
    root: true,
    env: {
        node: true
    },
    extends: [
        "plugin:vue/vue3-essential",
        "eslint:recommended",
        "@vue/typescript/recommended",
        "@vue/prettier",
        "@vue/prettier/@typescript-eslint"
    ],
    parserOptions: {
        ecmaVersion: 2020
    },
    rules: {
        "no-console": process.env.NODE_ENV === "production" ? "warn" : "off",
        "no-debugger": process.env.NODE_ENV === "production" ? "warn" : "off"
    },
    overrides: [
        {
            files: [
                "**/__tests__/*.{j,t}s?(x)",
                "**/tests/unit/**/*.spec.{j,t}s?(x)"
            ],
            env: {
                jest: true
            }
        }
    ]
};
```

### `babel.config.js`

```js
module.exports = {
  presets: ["@vue/cli-plugin-babel/preset"]
};
```

### `package.json`

```json
{
  "name": "surveyjs-library-vue3",
  "version": "0.1.0",
  "scripts": {
    "serve": "vue-cli-service serve",
    "build": "vue-cli-service build",
    "lint": "vue-cli-service lint"
  },
  "dependencies": {
    "core-js": "^3.6.5",
    "tslib": "2.6.1",
    "vue": "^3.4.1",
    "survey-core": "latest",
    "survey-pdf": "latest",
    "survey-vue3-ui": "latest",
    "vue-router": "^4.0.0-0",
    "vuex": "^4.0.0-0"
  },
  "devDependencies": {
    "@typescript-eslint/eslint-plugin": "^2.33.0",
    "@typescript-eslint/parser": "^2.33.0",
    "@vue/cli-plugin-babel": "~4.5.0",
    "@vue/cli-plugin-eslint": "~4.5.0",
    "@vue/cli-plugin-pwa": "~4.5.0",
    "@vue/cli-plugin-router": "~4.5.0",
    "@vue/cli-plugin-typescript": "~4.5.0",
    "@vue/cli-plugin-vuex": "~4.5.0",
    "@vue/cli-service": "~4.5.0",
    "@vue/compiler-sfc": "^3.0.0",
    "@vue/eslint-config-prettier": "^6.0.0",
    "@vue/eslint-config-typescript": "^5.0.2",
    "@vue/test-utils": "^2.0.0-0",
    "eslint": "^6.7.2",
    "eslint-plugin-prettier": "^3.1.3",
    "eslint-plugin-vue": "^7.0.0-0",
    "node-sass": "^4.12.0",
    "prettier": "^1.19.1",
    "sass-loader": "^8.0.2",
    "typescript": "~3.9.3"
  }
}
```

### `tsconfig.json`

```json
{
  "compilerOptions": {
    "target": "esnext",
    "module": "esnext",
    "strict": true,
    "jsx": "preserve",
    "importHelpers": true,
    "moduleResolution": "node",
    "skipLibCheck": true,
    "esModuleInterop": true,
    "allowSyntheticDefaultImports": true,
    "sourceMap": true,
    "baseUrl": ".",
    "types": [
      "webpack-env",
      "jest"
    ],
    "paths": {
      "@/*": [
        "src/*"
      ]
    },
    "lib": [
      "esnext",
      "dom",
      "dom.iterable",
      "scripthost"
    ]
  },
  "include": [
    "src/**/*.ts",
    "src/**/*.tsx",
    "src/**/*.vue",
    "tests/**/*.ts",
    "tests/**/*.tsx"
  ],
  "exclude": [
    "node_modules"
  ]
}
```

## Other Frameworks

- [Angular](https://surveyjs.io/pdf-generator/examples/pdf-education-event-registration-form-template/angular.md)
- [React](https://surveyjs.io/pdf-generator/examples/pdf-education-event-registration-form-template/reactjs.md)
- [jQuery](https://surveyjs.io/pdf-generator/examples/pdf-education-event-registration-form-template/jquery.md)
- [Vanilla JS](https://surveyjs.io/pdf-generator/examples/pdf-education-event-registration-form-template/vanillajs.md)
