[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"marketplace-site-banners":3,"github-stars":9,"directus-extension-surveyjs":115},[4],{"id":5,"icon":6,"content":7,"link":8,"include_paths":6,"exclude_paths":6},"5cf2f5f6-aecf-4395-8c23-69de326fdf02",null,"AI Assistant: Query Your Data, Update Content + More","https:\u002F\u002Fdirectus.com\u002Fai",{"id":10,"node_id":11,"name":12,"full_name":13,"private":14,"owner":15,"html_url":33,"description":34,"fork":14,"url":35,"forks_url":36,"keys_url":37,"collaborators_url":38,"teams_url":39,"hooks_url":40,"issue_events_url":41,"events_url":42,"assignees_url":43,"branches_url":44,"tags_url":45,"blobs_url":46,"git_tags_url":47,"git_refs_url":48,"trees_url":49,"statuses_url":50,"languages_url":51,"stargazers_url":52,"contributors_url":53,"subscribers_url":54,"subscription_url":55,"commits_url":56,"git_commits_url":57,"comments_url":58,"issue_comment_url":59,"contents_url":60,"compare_url":61,"merges_url":62,"archive_url":63,"downloads_url":64,"issues_url":65,"pulls_url":66,"milestones_url":67,"notifications_url":68,"labels_url":69,"releases_url":70,"deployments_url":71,"created_at":72,"updated_at":73,"pushed_at":74,"git_url":75,"ssh_url":76,"clone_url":77,"svn_url":33,"homepage":78,"size":79,"stargazers_count":80,"watchers_count":80,"language":81,"has_issues":82,"has_projects":82,"has_downloads":14,"has_wiki":14,"has_pages":14,"has_discussions":82,"forks_count":83,"mirror_url":6,"archived":14,"disabled":14,"open_issues_count":84,"license":85,"allow_forking":82,"is_template":14,"web_commit_signoff_required":14,"has_pull_requests":82,"pull_request_creation_policy":90,"topics":91,"visibility":32,"forks":83,"open_issues":84,"watchers":80,"default_branch":111,"temp_clone_token":6,"custom_properties":112,"organization":113,"network_count":83,"subscribers_count":114},7122594,"MDEwOlJlcG9zaXRvcnk3MTIyNTk0","directus","directus\u002Fdirectus",false,{"login":12,"id":16,"node_id":17,"avatar_url":18,"gravatar_id":19,"url":20,"html_url":21,"followers_url":22,"following_url":23,"gists_url":24,"starred_url":25,"subscriptions_url":26,"organizations_url":27,"repos_url":28,"events_url":29,"received_events_url":30,"type":31,"user_view_type":32,"site_admin":14},15967950,"MDEyOk9yZ2FuaXphdGlvbjE1OTY3OTUw","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F15967950?v=4","","https:\u002F\u002Fapi.github.com\u002Fusers\u002Fdirectus","https:\u002F\u002Fgithub.com\u002Fdirectus","https:\u002F\u002Fapi.github.com\u002Fusers\u002Fdirectus\u002Ffollowers","https:\u002F\u002Fapi.github.com\u002Fusers\u002Fdirectus\u002Ffollowing{\u002Fother_user}","https:\u002F\u002Fapi.github.com\u002Fusers\u002Fdirectus\u002Fgists{\u002Fgist_id}","https:\u002F\u002Fapi.github.com\u002Fusers\u002Fdirectus\u002Fstarred{\u002Fowner}{\u002Frepo}","https:\u002F\u002Fapi.github.com\u002Fusers\u002Fdirectus\u002Fsubscriptions","https:\u002F\u002Fapi.github.com\u002Fusers\u002Fdirectus\u002Forgs","https:\u002F\u002Fapi.github.com\u002Fusers\u002Fdirectus\u002Frepos","https:\u002F\u002Fapi.github.com\u002Fusers\u002Fdirectus\u002Fevents{\u002Fprivacy}","https:\u002F\u002Fapi.github.com\u002Fusers\u002Fdirectus\u002Freceived_events","Organization","public","https:\u002F\u002Fgithub.com\u002Fdirectus\u002Fdirectus","The flexible backend for all your projects 🐰 Turn your DB into a headless CMS, admin panels, or apps with a custom UI, instant APIs, auth & more.","https:\u002F\u002Fapi.github.com\u002Frepos\u002Fdirectus\u002Fdirectus","https:\u002F\u002Fapi.github.com\u002Frepos\u002Fdirectus\u002Fdirectus\u002Fforks","https:\u002F\u002Fapi.github.com\u002Frepos\u002Fdirectus\u002Fdirectus\u002Fkeys{\u002Fkey_id}","https:\u002F\u002Fapi.github.com\u002Frepos\u002Fdirectus\u002Fdirectus\u002Fcollaborators{\u002Fcollaborator}","https:\u002F\u002Fapi.github.com\u002Frepos\u002Fdirectus\u002Fdirectus\u002Fteams","https:\u002F\u002Fapi.github.com\u002Frepos\u002Fdirectus\u002Fdirectus\u002Fhooks","https:\u002F\u002Fapi.github.com\u002Frepos\u002Fdirectus\u002Fdirectus\u002Fissues\u002Fevents{\u002Fnumber}","https:\u002F\u002Fapi.github.com\u002Frepos\u002Fdirectus\u002Fdirectus\u002Fevents","https:\u002F\u002Fapi.github.com\u002Frepos\u002Fdirectus\u002Fdirectus\u002Fassignees{\u002Fuser}","https:\u002F\u002Fapi.github.com\u002Frepos\u002Fdirectus\u002Fdirectus\u002Fbranches{\u002Fbranch}","https:\u002F\u002Fapi.github.com\u002Frepos\u002Fdirectus\u002Fdirectus\u002Ftags","https:\u002F\u002Fapi.github.com\u002Frepos\u002Fdirectus\u002Fdirectus\u002Fgit\u002Fblobs{\u002Fsha}","https:\u002F\u002Fapi.github.com\u002Frepos\u002Fdirectus\u002Fdirectus\u002Fgit\u002Ftags{\u002Fsha}","https:\u002F\u002Fapi.github.com\u002Frepos\u002Fdirectus\u002Fdirectus\u002Fgit\u002Frefs{\u002Fsha}","https:\u002F\u002Fapi.github.com\u002Frepos\u002Fdirectus\u002Fdirectus\u002Fgit\u002Ftrees{\u002Fsha}","https:\u002F\u002Fapi.github.com\u002Frepos\u002Fdirectus\u002Fdirectus\u002Fstatuses\u002F{sha}","https:\u002F\u002Fapi.github.com\u002Frepos\u002Fdirectus\u002Fdirectus\u002Flanguages","https:\u002F\u002Fapi.github.com\u002Frepos\u002Fdirectus\u002Fdirectus\u002Fstargazers","https:\u002F\u002Fapi.github.com\u002Frepos\u002Fdirectus\u002Fdirectus\u002Fcontributors","https:\u002F\u002Fapi.github.com\u002Frepos\u002Fdirectus\u002Fdirectus\u002Fsubscribers","https:\u002F\u002Fapi.github.com\u002Frepos\u002Fdirectus\u002Fdirectus\u002Fsubscription","https:\u002F\u002Fapi.github.com\u002Frepos\u002Fdirectus\u002Fdirectus\u002Fcommits{\u002Fsha}","https:\u002F\u002Fapi.github.com\u002Frepos\u002Fdirectus\u002Fdirectus\u002Fgit\u002Fcommits{\u002Fsha}","https:\u002F\u002Fapi.github.com\u002Frepos\u002Fdirectus\u002Fdirectus\u002Fcomments{\u002Fnumber}","https:\u002F\u002Fapi.github.com\u002Frepos\u002Fdirectus\u002Fdirectus\u002Fissues\u002Fcomments{\u002Fnumber}","https:\u002F\u002Fapi.github.com\u002Frepos\u002Fdirectus\u002Fdirectus\u002Fcontents\u002F{+path}","https:\u002F\u002Fapi.github.com\u002Frepos\u002Fdirectus\u002Fdirectus\u002Fcompare\u002F{base}...{head}","https:\u002F\u002Fapi.github.com\u002Frepos\u002Fdirectus\u002Fdirectus\u002Fmerges","https:\u002F\u002Fapi.github.com\u002Frepos\u002Fdirectus\u002Fdirectus\u002F{archive_format}{\u002Fref}","https:\u002F\u002Fapi.github.com\u002Frepos\u002Fdirectus\u002Fdirectus\u002Fdownloads","https:\u002F\u002Fapi.github.com\u002Frepos\u002Fdirectus\u002Fdirectus\u002Fissues{\u002Fnumber}","https:\u002F\u002Fapi.github.com\u002Frepos\u002Fdirectus\u002Fdirectus\u002Fpulls{\u002Fnumber}","https:\u002F\u002Fapi.github.com\u002Frepos\u002Fdirectus\u002Fdirectus\u002Fmilestones{\u002Fnumber}","https:\u002F\u002Fapi.github.com\u002Frepos\u002Fdirectus\u002Fdirectus\u002Fnotifications{?since,all,participating}","https:\u002F\u002Fapi.github.com\u002Frepos\u002Fdirectus\u002Fdirectus\u002Flabels{\u002Fname}","https:\u002F\u002Fapi.github.com\u002Frepos\u002Fdirectus\u002Fdirectus\u002Freleases{\u002Fid}","https:\u002F\u002Fapi.github.com\u002Frepos\u002Fdirectus\u002Fdirectus\u002Fdeployments","2012-12-12T01:35:36Z","2026-07-27T16:45:23Z","2026-07-27T16:52:38Z","git:\u002F\u002Fgithub.com\u002Fdirectus\u002Fdirectus.git","git@github.com:directus\u002Fdirectus.git","https:\u002F\u002Fgithub.com\u002Fdirectus\u002Fdirectus.git","https:\u002F\u002Fdirectus.com",446699,36906,"TypeScript",true,4862,398,{"key":86,"name":87,"spdx_id":88,"url":6,"node_id":89},"other","Other","NOASSERTION","MDc6TGljZW5zZTA=","all",[92,93,94,95,96,97,12,98,99,100,101,102,103,104,105,106,107,108,109,110],"api","app","cms","composable","data-visualization","database","graphql","headless-cms","javascript","mariadb","mssql","mysql","no-code","node","postgresql","sql","sqlite","typescript","vue","main",{},{"login":12,"id":16,"node_id":17,"avatar_url":18,"gravatar_id":19,"url":20,"html_url":21,"followers_url":22,"following_url":23,"gists_url":24,"starred_url":25,"subscriptions_url":26,"organizations_url":27,"repos_url":28,"events_url":29,"received_events_url":30,"type":31,"user_view_type":32,"site_admin":14},329,{"name":116,"description":117,"verified":14,"id":118,"readme":119,"type":120,"last_updated":121,"host_version":122,"downloads":123,"total_downloads":126,"sandbox":14,"license":6,"publisher":194,"versions":197,"formatted_name":248,"formatted_readme":249,"formatted_description":117,"featured_image":250,"images":251,"recent_downloads_7_days":252,"recent_downloads_30_days":253},"directus-extension-surveyjs","Bundles a module and api endpoints Directus extenstions with SurveyJS to make the form creation and submission process easier","cfad07d4-d17a-45ae-b777-7ff13cde8984","\n![Design sans titre](https:\u002F\u002Fgithub.com\u002Fuser-attachments\u002Fassets\u002F90bcacdf-c118-44c1-a61c-c297280f8720)\n\n# Directus Extension for SurveyJS\n\nA Directus Module extension that integrates the SurveyJS Creator into Directus.\n\n## Table of Contents\n\n- [Introduction](#introduction)\n- [Installation](#installation)\n- [Configuration](#configuration)\n- [Using the Builder](#using-the-builder)\n- [API Endpoints](#api-endpoints)\n- [Handling Form Submissions](#handling-form-submissions)\n- [Notifications](#notifications)\n- [Contributing](#contributing)\n- [License](#license)\n\n## Introduction\n\nThis extension allows you to create and manage surveys using the SurveyJS Creator directly within Directus. It provides a seamless interface for building, updating, and storing survey configurations.\n\n## Installation\n\n- [Official Guide](https:\u002F\u002Fdocs.directus.io\u002Fextensions\u002Finstalling-extensions.html)\n- NPM Package: https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002Fdirectus-extension-surveyjs\n\n## Configuration\n\n### Basic Setup\n\n#### Using template (recommended)\n\nhttps:\u002F\u002Fgithub.com\u002Fuser-attachments\u002Fassets\u002F1c7b7861-6338-4641-aed3-ea36e4c958d1\n\n1. Install the extension using the provided npm package in your directus instance\n2. Download the directus template (directus-surveyjs-template directory in repository) containing basic collections and flows to work with the extension. The template contains:\n   - The form configuration collection (2 already configured forms as example available)\n   - The languages collection (if not already created)\n   - A basic generic form submission collection\n   - A basic form submission collection named Registrations (can be deleted) as an example.\n   - A Notifications Template collection\n   - A Notifications collection\n   - Flows to handle notifications\n3. Apply the the directus template to your directus instance using the following command :\n   ```bash\n   npx directus-template-cli@latest apply -p --directusUrl=\"your-directus-url\" --directusToken=\"directus-admin-token\" --templateLocation=\"local-path-to-template\" --templateType=\"local\" --partial --no-users --no-settings --no-files --no-dashboards --no-extensions\n   ```\nSee [next steps -> Translations](#translations)\n\n#### Without template\n\nAfter installation, the first time you will open the module page, you will be prompted with a form to finish the basic configuration.\nThe first field allows you to give the name to the collection that will be used to store all your form configurations. Default is `form_configs`\n\nIf you don't already have the `languages` collection made by directus, make sure to create one. \u003Cbr\u002F>\n**languages**\n   - `code` (String): Text.\n   - `name` (String): Text.\n   - `direction` (String): Text. \u003Cbr\u002F>\n   See video for more details :\n\n\nhttps:\u002F\u002Fgithub.com\u002Fuser-attachments\u002Fassets\u002F019e914a-3284-472c-a9a1-38c92ff33aec\n\nClicking the `Finish setup` button will create the basic necessary collections for the creator to work.\nCollections created :\n- form_configs\n- module_extension_survey_settings \u003Cbr \u002F>\n\nPermissions: \n- `form_configs`: READ\n- `module_extension_survey_settings`: READ\n- `[form_submission_collection]`: CREATE\n\n\n### Translations\n\nThe translations available in the creator are based on the languages you have setup in your directus instance https:\u002F\u002Fdocs.directus.io\u002Fguides\u002Fheadless-cms\u002Fcontent-translations.html#create-a-languages-collection\n\nModule translations strings to add to your directus instance : \n- `$t:extension_survey_form_creator` : Title used in the page navigation of the module \"Form Creator\"\n- `$t:extension_survey_no_forms` : Message displayed when no forms are found, should be something like \"No forms available\"\n- `$t:extension_survey_module_name` : Name of the module, should be something like \"Forms\"\n\nHandle default form creator form language:\nAdd a field M2O inside the `module_extension_survey_settings` collection named `default_form_language`.\nFrom there, choose in the settings your default language.\n\n### Settings\nThe settings provide the default SurveyJS options available to the creator listed here https:\u002F\u002Fsurveyjs.io\u002Fsurvey-creator\u002Fdocumentation\u002Fapi-reference\u002Ficreatoroptions\nIn addition, there is the `licence_key` option that allows you to put your license for SurveyJS.\nYou can also add manually a field with the key `default_form_language` M2O to `languages` collection to handle the default form language\n\n### Activation\n\nActivate the module by navigating to:\n`Settings -> Settings -> Modules` and enabling the Survey module.\n\n## Using the Builder\n\n### Creating \u002F updating and saving a form\n\n1. **Create Form Configuration**: Create a `form_configs` content object and assign it a `friendly_id`.\n2. **Access Surveys Tab**: Navigate to the Surveys Tab on the far left sidebar of Directus. All `form_configs` content objects will be listed with their `friendly_id` as the title.\n3. **Open the Builder**: Click on a form configuration to access its builder.\n4. **Build Your Form**: Use the builder to create your form. Remember to save your work!\n5. **Verify Schema**: After saving, go back to your Directus content and find the modified `form_config`. The `schema` should be updated with the new schema generated from the builder.\n\n### How translations work\n\n- Builder interface language : The interface language of the builder is based on the language selected by the user inside his directus settings.\n- How to translate a form :\n  1. The available languages provided to translate the form are based on the instances of your `languages` directus collection. So if you only have one language, your forms won't be translatable.\n  2. Having 2 languages setup, all translations are handled inside the `Translations` tab of the builder. There you can add languages you wish to translate your forms in the left sidebar. For each language added, a new column will be added to translate every \n     string your form could contain.\n\n### Custom question types\n\nIn addition to the built-in SurveyJS questions, the builder registers two **List Box** question types — an always-visible, scrollable selectable list (no popover):\n\n| Toolbox title (en \u002F fr)                              | Schema `type`      | Based on     | Selection |\n| ---------------------------------------------------- | ------------------ | ------------ | --------- |\n| List Box \u002F Liste de sélection                        | `listbox`          | `radiogroup` | single    |\n| List Box (multiple) \u002F Liste à sélection multiple     | `multilistbox`     | `checkbox`   | multiple  |\n\nBecause they inherit from `radiogroup` \u002F `checkbox`, they expose the **same options as the built-in choice questions** (choices, \"choices by URL\", \"choices from question\", validators, visibility rules, etc.) and are localized through the same Directus language setup. The list is keyboard navigable (arrow \u002F Home \u002F End \u002F Enter \u002F Space) and follows the WAI-ARIA `listbox` pattern.\n\n## API Endpoints\n\nThe extension provides several API endpoints for interacting with surveys. To access each route, you need to use the domain where your directus instance is hosted followed by `\u002Fsurvey-api` followed by the route. \u003Cbr\u002F>\nExample: `https:\u002F\u002Fdirectus-domain-example\u002Fsurvey-api\u002Fform-config-create`\n\n### Create Form Entry\n\n- **Endpoint**: `POST \u002Fform-submission\u002F:formConfigId`\n- **Description**: Creates a form entry from a form submission.\n- **URL Parameters**:\n  - `formConfigId`: The ID of the `form_configs` object.\n- **Request Requirements**:\n  - **Body**: The data from the form.\n  - **Headers**: `{'Content-Type': 'application\u002Fjson'}`\n\n### Update Form Configuration\n\n- **Endpoint**: `PATCH \u002Fform-config-update\u002F:formConfigId`\n- **Description**: Used internally by the extension to update a `form_config` when saved inside the builder.\n\n### Create Form Configuration\n\n- **Endpoint**: `POST \u002Fform-config-create`\n- **Description**: Used internally to potentially add a create form button inside the listing of the module.\n\n## Handling Form Submissions\n\nTo handle form submissions, you need to create a collection that will be used as a type of submission.\nEach form configuration accepts one type of form submission by passing it the name of the collection created in the field `form_submission_collection`.\nWhen submitting a form with this config, an entry will be created in that collection.\n\nExample : If your form submission collection is called `registrations`, your field should contain the exact name `registrations` in your form_config's form_submission_collection field\n\n### Create your form submission collection\nThis collection can take the name you wish.\nAdd the fields you wish to collect data from the form. \nExamples : \n- form_data -> Code (JSON): all data from the form\n- last_name -> Text : a field that would have the a last name as an input\n\nIf you create a form submission collection for a specific form config, you need to specify it in the form config in the form_submission_collection field. The field value should be the name of your form submission collection.\nExample : \n\nYou created a form submission collection called `registrations`. You need to put `registrations` as the value of the form_submission_collection field.\n\nYou can use the **Field Map** in the form config to map fields created from SurveyJS to a field inside you form submission collection.\nIf you use the same function to map your fields as the one used in the code example showed below, your mapping should look like the example below.\n\nExample: \n\nData received from SurveyJS :\n```js\n{\n   firstName: \"John\",\n   lastName: \"Doe\"\n}\n```\n\nField names in form submission collection:\n```js\n{\n   first_name: Text,\n   last_name: Text\n}\n```\n\nYour field map should look like \n\n```json\n{\n   \"first_name\": \"firstName\",\n   \"last_name\": \"lastName\"\n}\n```\n\n### Example code for submission in React\n```tsx\nimport { useCallback } from 'react'\nimport { Model } from 'survey-core'\nimport { Survey } from 'survey-react-ui'\nimport 'survey-core\u002Fsurvey-core.min.css'\nimport 'survey-core\u002Fsurvey.i18n'\n\ninterface TDirectusSurveyProps {\n  formConfigId: string\n  schema: JsonObject\n  locale?: string\n  versionDate?: string\n  fieldMap?: JsonObject\n  additionalData?: JsonObject\n}\n\ntype JsonValue = string | number | boolean | null | JsonObject | JsonArray\ninterface JsonObject {\n  [key: string]: JsonValue\n}\n\ntype JsonArray = Array\u003CJsonValue>\n\nconst DirectusSurvey = (props: TDirectusSurveyProps) => {\n  const { locale = 'default', schema, formConfigId, fieldMap, additionalData, versionDate } = props\n\n  const survey = new Model(schema)\n  survey.locale = locale\n\n  \u002F\u002F Survey onComplete handler\n  const saveSurveyResults = (url: string, json: JSONObject) => {\n    const entriesFieldMap = Object.entries(fieldMap ?? {})\n\n    const mappedFields = entriesFieldMap\n      .map(([key, value]: string[]) => {\n        if (json?.[value]) {\n          return [key, json?.[value]]\n        }\n        return null\n      })\n      .filter((el) => el !== null)\n\n    const body = {\n      ...Object.fromEntries(mappedFields),\n      ...additionalData,\n      default_fields: {\n        form_data: {\n          ...json,\n          ...additionalData,\n        },\n        form_config: formConfigId,\n        form_language: locale,\n        form_config_version_date: versionDate,\n      },\n    }\n\n    fetch(url, {\n      method: 'POST',\n      headers: {\n        'Content-Type': 'application\u002Fjson;charset=UTF-8',\n      },\n      body: JSON.stringify(body),\n    })\n      .then((response) => {\n        if (response.ok) {\n          \u002F\u002F Handle success\n        } else {\n          \u002F\u002F Handle error\n        }\n      })\n      .catch((error) => {\n        \u002F\u002F Handle error\n      })\n  }\n\n  const handleComplete = useCallback((form: Model) => {\n    saveSurveyResults(`{{ your domain here }}\u002Fsurvey-api\u002Fform-submission\u002F${formConfigId}`, form.data)\n  }, [])\n\n  survey.onComplete.add(handleComplete)\n\n  return \u003CSurvey model={survey} \u002F>\n}\n\nexport default DirectusSurvey\n\n```\n\n## Notifications\n\nNotifications play a crucial role in managing email alerts triggered by form submissions.\n\nEach `form_config` is associated with the `notifications_template` collection through a many-to-many relationship. Notification templates use a simple templating engine that supports the insertion of variables from form submissions, formatted as {{ variable_name }}.\n\nKey components of a notification template include:\n\n- **Recipients**: This field lists the email addresses that will receive the notification when a form is submitted.\n- **Title**: This is used to identify different templates within Directus.\n- **Subject**: The subject line of the email.\n- **Template**: The content body of the email.\n- **Conditions**: You can specify JavaScript expressions here to determine whether the notification should be sent.\n\nWhen a notification is successfully dispatched, a new item is created in the `notifications` collection.\n\n\n## Contributing\n\nContributions are welcome! Please open an issue or submit a pull request for any improvements or bug fixes.\n\n## License\n\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.\n\n---\n\nFeel free to contribute or suggest improvements!\n\n","bundle","2026-07-13T16:40:07.872Z","^11.8.0",[124,127,130,132,134,136,139,142,145,147,149,151,153,156,158,160,162,164,166,169,171,173,175,178,180,183,186,188,190,192],{"date":125,"count":126},"2026-06-25",0,{"date":128,"count":129},"2026-06-26",1,{"date":131,"count":129},"2026-06-27",{"date":133,"count":126},"2026-06-28",{"date":135,"count":129},"2026-06-29",{"date":137,"count":138},"2026-06-30",4,{"date":140,"count":141},"2026-07-01",9,{"date":143,"count":144},"2026-07-02",5,{"date":146,"count":129},"2026-07-03",{"date":148,"count":126},"2026-07-04",{"date":150,"count":126},"2026-07-05",{"date":152,"count":126},"2026-07-06",{"date":154,"count":155},"2026-07-07",10,{"date":157,"count":144},"2026-07-08",{"date":159,"count":144},"2026-07-09",{"date":161,"count":126},"2026-07-10",{"date":163,"count":126},"2026-07-11",{"date":165,"count":126},"2026-07-12",{"date":167,"count":168},"2026-07-13",139,{"date":170,"count":141},"2026-07-14",{"date":172,"count":129},"2026-07-15",{"date":174,"count":138},"2026-07-16",{"date":176,"count":177},"2026-07-17",2,{"date":179,"count":138},"2026-07-18",{"date":181,"count":182},"2026-07-19",3,{"date":184,"count":185},"2026-07-20",8,{"date":187,"count":177},"2026-07-21",{"date":189,"count":185},"2026-07-22",{"date":191,"count":182},"2026-07-23",{"date":193,"count":138},"2026-07-24",{"username":195,"verified":14,"id":196,"github_username":6,"github_name":6,"github_blog":6,"github_bio":6,"github_location":6,"github_company":6,"github_avatar_url":6},"okam-bot","6b3f5590-5706-4dd5-b28f-a6813845f1b8",[198,209,218,228,238],{"version":199,"package":118,"publisher":196,"type":120,"host_version":200,"publish_date":201,"verified":14,"id":202,"url_repository":6,"url_homepage":6,"url_bugs":6,"file_count":144,"unpacked_size":203,"sandbox":14,"sandbox_requested_scopes":6,"license":6,"bundled":204,"maintainers":207},"1.0.2","^10.10.0","2024-09-13T19:26:22.909Z","39e2f836-b068-43e7-b280-b571be0237b0",6575948,[205,206],"00b6d071-4705-44ff-8522-30265e055308","1bd09793-e57f-49d3-842f-5570ed1a4d50",[208],11415,{"version":210,"package":118,"publisher":196,"type":120,"host_version":122,"publish_date":121,"verified":14,"id":211,"url_repository":6,"url_homepage":6,"url_bugs":6,"file_count":144,"unpacked_size":212,"sandbox":14,"sandbox_requested_scopes":6,"license":6,"bundled":213,"maintainers":216},"1.1.0","afe01c7e-e29d-4721-8bb3-59bbca20d2a3",8098328,[214,215],"2c9c6635-76b8-4a7f-8853-ce406636138d","ee1ea0af-11f2-4a02-8f77-d5a0a9cbfcad",[217],14686,{"version":219,"package":118,"publisher":196,"type":120,"host_version":200,"publish_date":220,"verified":14,"id":221,"url_repository":6,"url_homepage":6,"url_bugs":6,"file_count":144,"unpacked_size":222,"sandbox":14,"sandbox_requested_scopes":6,"license":6,"bundled":223,"maintainers":226},"1.0.1","2024-08-30T21:12:59.490Z","c384c965-9872-4e04-84e6-3491dc3e3a12",6575950,[224,225],"2cc790f1-2a83-4440-a3d3-dbfe9e7b8d6f","4c1fc68e-d149-47d9-926a-039d92b5381d",[227],11341,{"version":229,"package":118,"publisher":196,"type":120,"host_version":200,"publish_date":230,"verified":14,"id":231,"url_repository":6,"url_homepage":6,"url_bugs":6,"file_count":144,"unpacked_size":232,"sandbox":14,"sandbox_requested_scopes":6,"license":6,"bundled":233,"maintainers":236},"1.0.0","2024-08-27T19:18:21.808Z","d4a5feac-bca2-4276-b621-8a92c1625763",6575464,[234,235],"7d9f29c3-5799-4622-b95c-6ac858dac0f6","806273c0-93bc-49ca-ba09-9a158ec363a4",[237],11328,{"version":239,"package":118,"publisher":196,"type":120,"host_version":200,"publish_date":240,"verified":14,"id":241,"url_repository":6,"url_homepage":6,"url_bugs":6,"file_count":144,"unpacked_size":242,"sandbox":14,"sandbox_requested_scopes":6,"license":6,"bundled":243,"maintainers":246},"1.0.3","2024-09-20T21:17:33.710Z","ef815da7-b5d5-4417-bf54-af98b2b1846e",6576323,[244,245],"3ab1c8b7-1623-41d8-9940-282842e18b03","3ffd49ab-7e0f-478b-aa53-902361ba8a79",[247],11416,"Surveyjs","\n\u003Ch1>Directus Extension for SurveyJS\u003C\u002Fh1>\n\u003Cp>A Directus Module extension that integrates the SurveyJS Creator into Directus.\u003C\u002Fp>\n\u003Ch2>Table of Contents\u003C\u002Fh2>\n\u003Cul>\n\u003Cli>\u003Ca href=\"#introduction\">Introduction\u003C\u002Fa>\u003C\u002Fli>\n\u003Cli>\u003Ca href=\"#installation\">Installation\u003C\u002Fa>\u003C\u002Fli>\n\u003Cli>\u003Ca href=\"#configuration\">Configuration\u003C\u002Fa>\u003C\u002Fli>\n\u003Cli>\u003Ca href=\"#using-the-builder\">Using the Builder\u003C\u002Fa>\u003C\u002Fli>\n\u003Cli>\u003Ca href=\"#api-endpoints\">API Endpoints\u003C\u002Fa>\u003C\u002Fli>\n\u003Cli>\u003Ca href=\"#handling-form-submissions\">Handling Form Submissions\u003C\u002Fa>\u003C\u002Fli>\n\u003Cli>\u003Ca href=\"#notifications\">Notifications\u003C\u002Fa>\u003C\u002Fli>\n\u003Cli>\u003Ca href=\"#contributing\">Contributing\u003C\u002Fa>\u003C\u002Fli>\n\u003Cli>\u003Ca href=\"#license\">License\u003C\u002Fa>\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Ch2>Introduction\u003C\u002Fh2>\n\u003Cp>This extension allows you to create and manage surveys using the SurveyJS Creator directly within Directus. It provides a seamless interface for building, updating, and storing survey configurations.\u003C\u002Fp>\n\u003Ch2>Installation\u003C\u002Fh2>\n\u003Cul>\n\u003Cli>\u003Ca href=\"https:\u002F\u002Fdocs.directus.io\u002Fextensions\u002Finstalling-extensions.html\">Official Guide\u003C\u002Fa>\u003C\u002Fli>\n\u003Cli>NPM Package: \u003Ca href=\"https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002Fdirectus-extension-surveyjs\">https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002Fdirectus-extension-surveyjs\u003C\u002Fa>\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Ch2>Configuration\u003C\u002Fh2>\n\u003Ch3>Basic Setup\u003C\u002Fh3>\n\u003Ch4>Using template (recommended)\u003C\u002Fh4>\n\u003Cp>\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fuser-attachments\u002Fassets\u002F1c7b7861-6338-4641-aed3-ea36e4c958d1\">https:\u002F\u002Fgithub.com\u002Fuser-attachments\u002Fassets\u002F1c7b7861-6338-4641-aed3-ea36e4c958d1\u003C\u002Fa>\u003C\u002Fp>\n\u003Col>\n\u003Cli>Install the extension using the provided npm package in your directus instance\u003C\u002Fli>\n\u003Cli>Download the directus template (directus-surveyjs-template directory in repository) containing basic collections and flows to work with the extension. The template contains:\n\u003Cul>\n\u003Cli>The form configuration collection (2 already configured forms as example available)\u003C\u002Fli>\n\u003Cli>The languages collection (if not already created)\u003C\u002Fli>\n\u003Cli>A basic generic form submission collection\u003C\u002Fli>\n\u003Cli>A basic form submission collection named Registrations (can be deleted) as an example.\u003C\u002Fli>\n\u003Cli>A Notifications Template collection\u003C\u002Fli>\n\u003Cli>A Notifications collection\u003C\u002Fli>\n\u003Cli>Flows to handle notifications\u003C\u002Fli>\n\u003C\u002Ful>\n\u003C\u002Fli>\n\u003Cli>Apply the the directus template to your directus instance using the following command :\n\u003Cpre>\u003Ccode class=\"language-bash\">npx directus-template-cli@latest apply -p --directusUrl=\"your-directus-url\" --directusToken=\"directus-admin-token\" --templateLocation=\"local-path-to-template\" --templateType=\"local\" --partial --no-users --no-settings --no-files --no-dashboards --no-extensions\n\u003C\u002Fcode>\u003C\u002Fpre>\u003C\u002Fli>\n\u003C\u002Fol>\n\u003Cp>See \u003Ca href=\"#translations\">next steps -&gt; Translations\u003C\u002Fa>\u003C\u002Fp>\n\u003Ch4>Without template\u003C\u002Fh4>\n\u003Cp>After installation, the first time you will open the module page, you will be prompted with a form to finish the basic configuration.\nThe first field allows you to give the name to the collection that will be used to store all your form configurations. Default is \u003Ccode>form_configs\u003C\u002Fcode>\u003C\u002Fp>\n\u003Cp>If you don't already have the \u003Ccode>languages\u003C\u002Fcode> collection made by directus, make sure to create one. \u003Cbr>\n\u003Cstrong>languages\u003C\u002Fstrong>\u003C\u002Fp>\n\u003Cul>\n\u003Cli>\u003Ccode>code\u003C\u002Fcode> (String): Text.\u003C\u002Fli>\n\u003Cli>\u003Ccode>name\u003C\u002Fcode> (String): Text.\u003C\u002Fli>\n\u003Cli>\u003Ccode>direction\u003C\u002Fcode> (String): Text. \u003Cbr>\nSee video for more details :\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Cp>\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fuser-attachments\u002Fassets\u002F019e914a-3284-472c-a9a1-38c92ff33aec\">https:\u002F\u002Fgithub.com\u002Fuser-attachments\u002Fassets\u002F019e914a-3284-472c-a9a1-38c92ff33aec\u003C\u002Fa>\u003C\u002Fp>\n\u003Cp>Clicking the \u003Ccode>Finish setup\u003C\u002Fcode> button will create the basic necessary collections for the creator to work.\nCollections created :\u003C\u002Fp>\n\u003Cul>\n\u003Cli>form_configs\u003C\u002Fli>\n\u003Cli>module_extension_survey_settings \u003Cbr>\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Cp>Permissions:\u003C\u002Fp>\n\u003Cul>\n\u003Cli>\u003Ccode>form_configs\u003C\u002Fcode>: READ\u003C\u002Fli>\n\u003Cli>\u003Ccode>module_extension_survey_settings\u003C\u002Fcode>: READ\u003C\u002Fli>\n\u003Cli>\u003Ccode>[form_submission_collection]\u003C\u002Fcode>: CREATE\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Ch3>Translations\u003C\u002Fh3>\n\u003Cp>The translations available in the creator are based on the languages you have setup in your directus instance \u003Ca href=\"https:\u002F\u002Fdocs.directus.io\u002Fguides\u002Fheadless-cms\u002Fcontent-translations.html#create-a-languages-collection\">https:\u002F\u002Fdocs.directus.io\u002Fguides\u002Fheadless-cms\u002Fcontent-translations.html#create-a-languages-collection\u003C\u002Fa>\u003C\u002Fp>\n\u003Cp>Module translations strings to add to your directus instance :\u003C\u002Fp>\n\u003Cul>\n\u003Cli>\u003Ccode>$t:extension_survey_form_creator\u003C\u002Fcode> : Title used in the page navigation of the module \"Form Creator\"\u003C\u002Fli>\n\u003Cli>\u003Ccode>$t:extension_survey_no_forms\u003C\u002Fcode> : Message displayed when no forms are found, should be something like \"No forms available\"\u003C\u002Fli>\n\u003Cli>\u003Ccode>$t:extension_survey_module_name\u003C\u002Fcode> : Name of the module, should be something like \"Forms\"\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Cp>Handle default form creator form language:\nAdd a field M2O inside the \u003Ccode>module_extension_survey_settings\u003C\u002Fcode> collection named \u003Ccode>default_form_language\u003C\u002Fcode>.\nFrom there, choose in the settings your default language.\u003C\u002Fp>\n\u003Ch3>Settings\u003C\u002Fh3>\n\u003Cp>The settings provide the default SurveyJS options available to the creator listed here \u003Ca href=\"https:\u002F\u002Fsurveyjs.io\u002Fsurvey-creator\u002Fdocumentation\u002Fapi-reference\u002Ficreatoroptions\">https:\u002F\u002Fsurveyjs.io\u002Fsurvey-creator\u002Fdocumentation\u002Fapi-reference\u002Ficreatoroptions\u003C\u002Fa>\nIn addition, there is the \u003Ccode>licence_key\u003C\u002Fcode> option that allows you to put your license for SurveyJS.\nYou can also add manually a field with the key \u003Ccode>default_form_language\u003C\u002Fcode> M2O to \u003Ccode>languages\u003C\u002Fcode> collection to handle the default form language\u003C\u002Fp>\n\u003Ch3>Activation\u003C\u002Fh3>\n\u003Cp>Activate the module by navigating to:\n\u003Ccode>Settings -&gt; Settings -&gt; Modules\u003C\u002Fcode> and enabling the Survey module.\u003C\u002Fp>\n\u003Ch2>Using the Builder\u003C\u002Fh2>\n\u003Ch3>Creating \u002F updating and saving a form\u003C\u002Fh3>\n\u003Col>\n\u003Cli>\u003Cstrong>Create Form Configuration\u003C\u002Fstrong>: Create a \u003Ccode>form_configs\u003C\u002Fcode> content object and assign it a \u003Ccode>friendly_id\u003C\u002Fcode>.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Access Surveys Tab\u003C\u002Fstrong>: Navigate to the Surveys Tab on the far left sidebar of Directus. All \u003Ccode>form_configs\u003C\u002Fcode> content objects will be listed with their \u003Ccode>friendly_id\u003C\u002Fcode> as the title.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Open the Builder\u003C\u002Fstrong>: Click on a form configuration to access its builder.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Build Your Form\u003C\u002Fstrong>: Use the builder to create your form. Remember to save your work!\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Verify Schema\u003C\u002Fstrong>: After saving, go back to your Directus content and find the modified \u003Ccode>form_config\u003C\u002Fcode>. The \u003Ccode>schema\u003C\u002Fcode> should be updated with the new schema generated from the builder.\u003C\u002Fli>\n\u003C\u002Fol>\n\u003Ch3>How translations work\u003C\u002Fh3>\n\u003Cul>\n\u003Cli>Builder interface language : The interface language of the builder is based on the language selected by the user inside his directus settings.\u003C\u002Fli>\n\u003Cli>How to translate a form :\n\u003Col>\n\u003Cli>The available languages provided to translate the form are based on the instances of your \u003Ccode>languages\u003C\u002Fcode> directus collection. So if you only have one language, your forms won't be translatable.\u003C\u002Fli>\n\u003Cli>Having 2 languages setup, all translations are handled inside the \u003Ccode>Translations\u003C\u002Fcode> tab of the builder. There you can add languages you wish to translate your forms in the left sidebar. For each language added, a new column will be added to translate every\nstring your form could contain.\u003C\u002Fli>\n\u003C\u002Fol>\n\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Ch3>Custom question types\u003C\u002Fh3>\n\u003Cp>In addition to the built-in SurveyJS questions, the builder registers two \u003Cstrong>List Box\u003C\u002Fstrong> question types — an always-visible, scrollable selectable list (no popover):\u003C\u002Fp>\n\u003Ctable>\n\u003Cthead>\n\u003Ctr>\n\u003Cth>Toolbox title (en \u002F fr)\u003C\u002Fth>\n\u003Cth>Schema \u003Ccode>type\u003C\u002Fcode>\u003C\u002Fth>\n\u003Cth>Based on\u003C\u002Fth>\n\u003Cth>Selection\u003C\u002Fth>\n\u003C\u002Ftr>\n\u003C\u002Fthead>\n\u003Ctbody>\n\u003Ctr>\n\u003Ctd>List Box \u002F Liste de sélection\u003C\u002Ftd>\n\u003Ctd>\u003Ccode>listbox\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd>\u003Ccode>radiogroup\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd>single\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>List Box (multiple) \u002F Liste à sélection multiple\u003C\u002Ftd>\n\u003Ctd>\u003Ccode>multilistbox\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd>\u003Ccode>checkbox\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd>multiple\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003C\u002Ftbody>\n\u003C\u002Ftable>\n\u003Cp>Because they inherit from \u003Ccode>radiogroup\u003C\u002Fcode> \u002F \u003Ccode>checkbox\u003C\u002Fcode>, they expose the \u003Cstrong>same options as the built-in choice questions\u003C\u002Fstrong> (choices, \"choices by URL\", \"choices from question\", validators, visibility rules, etc.) and are localized through the same Directus language setup. The list is keyboard navigable (arrow \u002F Home \u002F End \u002F Enter \u002F Space) and follows the WAI-ARIA \u003Ccode>listbox\u003C\u002Fcode> pattern.\u003C\u002Fp>\n\u003Ch2>API Endpoints\u003C\u002Fh2>\n\u003Cp>The extension provides several API endpoints for interacting with surveys. To access each route, you need to use the domain where your directus instance is hosted followed by \u003Ccode>\u002Fsurvey-api\u003C\u002Fcode> followed by the route. \u003Cbr>\nExample: \u003Ccode>https:\u002F\u002Fdirectus-domain-example\u002Fsurvey-api\u002Fform-config-create\u003C\u002Fcode>\u003C\u002Fp>\n\u003Ch3>Create Form Entry\u003C\u002Fh3>\n\u003Cul>\n\u003Cli>\u003Cstrong>Endpoint\u003C\u002Fstrong>: \u003Ccode>POST \u002Fform-submission\u002F:formConfigId\u003C\u002Fcode>\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Description\u003C\u002Fstrong>: Creates a form entry from a form submission.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>URL Parameters\u003C\u002Fstrong>:\n\u003Cul>\n\u003Cli>\u003Ccode>formConfigId\u003C\u002Fcode>: The ID of the \u003Ccode>form_configs\u003C\u002Fcode> object.\u003C\u002Fli>\n\u003C\u002Ful>\n\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Request Requirements\u003C\u002Fstrong>:\n\u003Cul>\n\u003Cli>\u003Cstrong>Body\u003C\u002Fstrong>: The data from the form.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Headers\u003C\u002Fstrong>: \u003Ccode>{'Content-Type': 'application\u002Fjson'}\u003C\u002Fcode>\u003C\u002Fli>\n\u003C\u002Ful>\n\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Ch3>Update Form Configuration\u003C\u002Fh3>\n\u003Cul>\n\u003Cli>\u003Cstrong>Endpoint\u003C\u002Fstrong>: \u003Ccode>PATCH \u002Fform-config-update\u002F:formConfigId\u003C\u002Fcode>\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Description\u003C\u002Fstrong>: Used internally by the extension to update a \u003Ccode>form_config\u003C\u002Fcode> when saved inside the builder.\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Ch3>Create Form Configuration\u003C\u002Fh3>\n\u003Cul>\n\u003Cli>\u003Cstrong>Endpoint\u003C\u002Fstrong>: \u003Ccode>POST \u002Fform-config-create\u003C\u002Fcode>\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Description\u003C\u002Fstrong>: Used internally to potentially add a create form button inside the listing of the module.\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Ch2>Handling Form Submissions\u003C\u002Fh2>\n\u003Cp>To handle form submissions, you need to create a collection that will be used as a type of submission.\nEach form configuration accepts one type of form submission by passing it the name of the collection created in the field \u003Ccode>form_submission_collection\u003C\u002Fcode>.\nWhen submitting a form with this config, an entry will be created in that collection.\u003C\u002Fp>\n\u003Cp>Example : If your form submission collection is called \u003Ccode>registrations\u003C\u002Fcode>, your field should contain the exact name \u003Ccode>registrations\u003C\u002Fcode> in your form_config's form_submission_collection field\u003C\u002Fp>\n\u003Ch3>Create your form submission collection\u003C\u002Fh3>\n\u003Cp>This collection can take the name you wish.\nAdd the fields you wish to collect data from the form.\nExamples :\u003C\u002Fp>\n\u003Cul>\n\u003Cli>form_data -&gt; Code (JSON): all data from the form\u003C\u002Fli>\n\u003Cli>last_name -&gt; Text : a field that would have the a last name as an input\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Cp>If you create a form submission collection for a specific form config, you need to specify it in the form config in the form_submission_collection field. The field value should be the name of your form submission collection.\nExample :\u003C\u002Fp>\n\u003Cp>You created a form submission collection called \u003Ccode>registrations\u003C\u002Fcode>. You need to put \u003Ccode>registrations\u003C\u002Fcode> as the value of the form_submission_collection field.\u003C\u002Fp>\n\u003Cp>You can use the \u003Cstrong>Field Map\u003C\u002Fstrong> in the form config to map fields created from SurveyJS to a field inside you form submission collection.\nIf you use the same function to map your fields as the one used in the code example showed below, your mapping should look like the example below.\u003C\u002Fp>\n\u003Cp>Example:\u003C\u002Fp>\n\u003Cp>Data received from SurveyJS :\u003C\u002Fp>\n\u003Cpre>\u003Ccode class=\"language-js\">{\n   firstName: \"John\",\n   lastName: \"Doe\"\n}\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>Field names in form submission collection:\u003C\u002Fp>\n\u003Cpre>\u003Ccode class=\"language-js\">{\n   first_name: Text,\n   last_name: Text\n}\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>Your field map should look like\u003C\u002Fp>\n\u003Cpre>\u003Ccode class=\"language-json\">{\n   \"first_name\": \"firstName\",\n   \"last_name\": \"lastName\"\n}\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Ch3>Example code for submission in React\u003C\u002Fh3>\n\u003Cpre>\u003Ccode class=\"language-tsx\">import { useCallback } from 'react'\nimport { Model } from 'survey-core'\nimport { Survey } from 'survey-react-ui'\nimport 'survey-core\u002Fsurvey-core.min.css'\nimport 'survey-core\u002Fsurvey.i18n'\n\ninterface TDirectusSurveyProps {\n  formConfigId: string\n  schema: JsonObject\n  locale?: string\n  versionDate?: string\n  fieldMap?: JsonObject\n  additionalData?: JsonObject\n}\n\ntype JsonValue = string | number | boolean | null | JsonObject | JsonArray\ninterface JsonObject {\n  [key: string]: JsonValue\n}\n\ntype JsonArray = Array&lt;JsonValue&gt;\n\nconst DirectusSurvey = (props: TDirectusSurveyProps) =&gt; {\n  const { locale = 'default', schema, formConfigId, fieldMap, additionalData, versionDate } = props\n\n  const survey = new Model(schema)\n  survey.locale = locale\n\n  \u002F\u002F Survey onComplete handler\n  const saveSurveyResults = (url: string, json: JSONObject) =&gt; {\n    const entriesFieldMap = Object.entries(fieldMap ?? {})\n\n    const mappedFields = entriesFieldMap\n      .map(([key, value]: string[]) =&gt; {\n        if (json?.[value]) {\n          return [key, json?.[value]]\n        }\n        return null\n      })\n      .filter((el) =&gt; el !== null)\n\n    const body = {\n      ...Object.fromEntries(mappedFields),\n      ...additionalData,\n      default_fields: {\n        form_data: {\n          ...json,\n          ...additionalData,\n        },\n        form_config: formConfigId,\n        form_language: locale,\n        form_config_version_date: versionDate,\n      },\n    }\n\n    fetch(url, {\n      method: 'POST',\n      headers: {\n        'Content-Type': 'application\u002Fjson;charset=UTF-8',\n      },\n      body: JSON.stringify(body),\n    })\n      .then((response) =&gt; {\n        if (response.ok) {\n          \u002F\u002F Handle success\n        } else {\n          \u002F\u002F Handle error\n        }\n      })\n      .catch((error) =&gt; {\n        \u002F\u002F Handle error\n      })\n  }\n\n  const handleComplete = useCallback((form: Model) =&gt; {\n    saveSurveyResults(`{{ your domain here }}\u002Fsurvey-api\u002Fform-submission\u002F${formConfigId}`, form.data)\n  }, [])\n\n  survey.onComplete.add(handleComplete)\n\n  return &lt;Survey model={survey} \u002F&gt;\n}\n\nexport default DirectusSurvey\n\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Ch2>Notifications\u003C\u002Fh2>\n\u003Cp>Notifications play a crucial role in managing email alerts triggered by form submissions.\u003C\u002Fp>\n\u003Cp>Each \u003Ccode>form_config\u003C\u002Fcode> is associated with the \u003Ccode>notifications_template\u003C\u002Fcode> collection through a many-to-many relationship. Notification templates use a simple templating engine that supports the insertion of variables from form submissions, formatted as {{ variable_name }}.\u003C\u002Fp>\n\u003Cp>Key components of a notification template include:\u003C\u002Fp>\n\u003Cul>\n\u003Cli>\u003Cstrong>Recipients\u003C\u002Fstrong>: This field lists the email addresses that will receive the notification when a form is submitted.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Title\u003C\u002Fstrong>: This is used to identify different templates within Directus.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Subject\u003C\u002Fstrong>: The subject line of the email.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Template\u003C\u002Fstrong>: The content body of the email.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Conditions\u003C\u002Fstrong>: You can specify JavaScript expressions here to determine whether the notification should be sent.\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Cp>When a notification is successfully dispatched, a new item is created in the \u003Ccode>notifications\u003C\u002Fcode> collection.\u003C\u002Fp>\n\u003Ch2>Contributing\u003C\u002Fh2>\n\u003Cp>Contributions are welcome! Please open an issue or submit a pull request for any improvements or bug fixes.\u003C\u002Fp>\n\u003Ch2>License\u003C\u002Fh2>\n\u003Cp>This project is licensed under the MIT License. See the \u003Ca href=\"LICENSE\">LICENSE\u003C\u002Fa> file for details.\u003C\u002Fp>\n\u003Chr>\n\u003Cp>Feel free to contribute or suggest improvements!\u003C\u002Fp>\n","https:\u002F\u002Fgithub.com\u002Fuser-attachments\u002Fassets\u002F90bcacdf-c118-44c1-a61c-c297280f8720",[250],17,227]