{"id":15012933,"url":"https://github.com/abhi9720/makemyform","last_synced_at":"2026-01-27T11:03:45.778Z","repository":{"id":221805999,"uuid":"754782112","full_name":"abhi9720/makemyform","owner":"abhi9720","description":null,"archived":false,"fork":false,"pushed_at":"2024-02-11T10:51:38.000Z","size":18,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-02T01:55:35.235Z","etag":null,"topics":["html","javascript","json-schema","makemyform"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/abhi9720.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-02-08T18:56:08.000Z","updated_at":"2024-02-11T12:07:55.000Z","dependencies_parsed_at":"2024-09-20T08:10:40.360Z","dependency_job_id":null,"html_url":"https://github.com/abhi9720/makemyform","commit_stats":{"total_commits":7,"total_committers":2,"mean_commits":3.5,"dds":0.2857142857142857,"last_synced_commit":"f8047bfae550030eee300e4a9d6b55c59680a34f"},"previous_names":["abhi9720/makemyform"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abhi9720%2Fmakemyform","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abhi9720%2Fmakemyform/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abhi9720%2Fmakemyform/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abhi9720%2Fmakemyform/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/abhi9720","download_url":"https://codeload.github.com/abhi9720/makemyform/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244900260,"owners_count":20528672,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["html","javascript","json-schema","makemyform"],"created_at":"2024-09-24T19:43:25.909Z","updated_at":"2026-01-27T11:03:40.748Z","avatar_url":"https://github.com/abhi9720.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## MakeMyForm\n\n![MIT license](https://img.shields.io/badge/License-MIT-blue.svg?longCache=true)\n![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?longCache=true)\n![NPM: released](https://img.shields.io/npm/v/makemyform.svg)\n\n---\n\n### Description\n\nMakeMyForm is a simple and lightweight JavaScript library designed to generate HTML forms dynamically based on JSON input. It provides an easy way to create custom HTML forms using a JSON schema.\n\n---\n\n### Dependencies\n\nMakeMyForm relies on the following npm packages:\n\n- **Ajv**: A JSON Schema validator for Node.js and browser. It is used for validating the JSON schema input provided by the user.\n\n  ![Ajv](https://img.shields.io/npm/v/ajv.svg)\n\n- **Jsdom**: A pure-JavaScript implementation of many web standards, notably the WHATWG DOM and HTML Standards. It is used for parsing and manipulating HTML documents in Node.js.\n\n  ![Jsdom](https://img.shields.io/npm/v/jsdom.svg)\n\n---\n\n### Installation\n\nYou can install MakeMyForm via npm:\n\n```bash\nnpm install makemyform\n```\n\n---\n\n### Usage\n\n#### Schema Format\n\nThe library expects a JSON schema following a specific format:\n\n```json\n{\n  \"form\": {\n    \"title\": \"string\",\n    \"description\": \"string\",\n    \"fields\": [\n      {\n        \"label\": \"string\",\n        \"element\": \"string\",\n        \"options\": [\n          {\n            \"name\": \"string\",\n            \"label\": \"string\",\n            \"value\": \"string\"\n          }\n        ],\n        \"validation\": {\n          \"required\": \"boolean\",\n          \"regex\": \"string\",\n          \"minLength\": \"number\",\n          \"maxLength\": \"number\",\n          \"minValue\": \"number\",\n          \"maxValue\": \"number\"\n        },\n        \"attributes\": {\n          \"attributeName\": \"value\"\n        }\n      }\n    ]\n  }\n}\n```\n\n#### Example Usage\n\n```javascript\nconst MakeMyForm = require(\"makemyform\");\n\nconst jsonFormData = {\n  form: {\n    title: \"Student Registration Form\",\n    description: \"Form for registering students at the university\",\n    fields: [\n      {\n        label: \"Enter your Email\",\n        element: \"email\",\n        validation: {\n          required: true,\n        },\n      },\n      {\n        label: \"Enter your password\",\n        element: \"password\",\n        validation: {\n          minLength: 5,\n          maxLength: 10,\n          required: true,\n        },\n      },\n    ],\n  },\n};\n\nconst htmlOutput = MakeMyForm.createForm(jsonFormData);\n\nconsole.log(htmlOutput);\n```\n\n#### Output\n\n```html\n\u003cform\u003e\n  \u003ch2\u003eStudent Registration Form\u003c/h2\u003e\n  \u003cp\u003eForm for registering students at the university\u003c/p\u003e\n  \u003cdiv\u003e\n    \u003clabel\u003eEnter your Email *\u003c/label\u003e\n    \u003cinput type=\"email\" /\u003e\n  \u003c/div\u003e\n  \u003cdiv\u003e\n    \u003clabel\u003eEnter your password *\u003c/label\u003e\n    \u003cinput type=\"password\" minlength=\"5\" maxlength=\"10\" /\u003e\n  \u003c/div\u003e\n  \u003cbutton type=\"submit\"\u003eSubmit\u003c/button\u003e\n\u003c/form\u003e\n```\n\n---\n\n### Repository\n\n[![GitHub issues](https://img.shields.io/github/issues/abhi9720/makemyform)](https://github.com/abhi9720/makemyform/issues)\n[![GitHub pull requests](https://img.shields.io/github/issues-pr/abhi9720/makemyform)](https://github.com/abhi9720/makemyform/pulls)\n\n[GitHub Repository](https://github.com/abhi9720/makemyform)\n\n---\n\n### License\n\nThis project is licensed under the MIT License - see the [LICENSE](https://github.com/abhi9720/makemyform/blob/main/LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabhi9720%2Fmakemyform","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fabhi9720%2Fmakemyform","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabhi9720%2Fmakemyform/lists"}