{"id":23891609,"url":"https://github.com/israeljunior/json-to-form","last_synced_at":"2026-04-19T01:02:01.154Z","repository":{"id":47395827,"uuid":"202549164","full_name":"israeljunior/json-to-form","owner":"israeljunior","description":"A lightweight script to generate forms from objects or JSON files.","archived":false,"fork":false,"pushed_at":"2023-01-04T07:16:26.000Z","size":426,"stargazers_count":1,"open_issues_count":10,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-16T04:33:52.280Z","etag":null,"topics":["form","javascript","json","vanilla-js"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/israeljunior.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-08-15T13:47:20.000Z","updated_at":"2020-03-08T14:32:21.000Z","dependencies_parsed_at":"2023-02-02T03:00:45.908Z","dependency_job_id":null,"html_url":"https://github.com/israeljunior/json-to-form","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/israeljunior%2Fjson-to-form","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/israeljunior%2Fjson-to-form/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/israeljunior%2Fjson-to-form/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/israeljunior%2Fjson-to-form/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/israeljunior","download_url":"https://codeload.github.com/israeljunior/json-to-form/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240272648,"owners_count":19775080,"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":["form","javascript","json","vanilla-js"],"created_at":"2025-01-04T12:59:55.310Z","updated_at":"2026-04-19T01:02:01.011Z","avatar_url":"https://github.com/israeljunior.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# JsonToForm\nA lightweight script to generate forms from objects or JSON files.\n\n\u003chr\u003e\n\n## Getting Started\nCompiled and production-ready code can be found in the `dist` directory. The `src` directory contains development code.\n\n### 1. Include JsonToForm on your site\nYou can [download the files directly from GitHub](https://github.com/israeljunior/json-to-form/archive/master.zip).\n\n```html\n\u003cscript src=\"path/to/json-to-form.min.js\"\u003e\u003c/script\u003e\n```\n\n### 2. Add the markup to your HTML\nNeeded only a container for the form.\n\n```html\n\u003cdiv id=\"form1\"\u003e\u003c/div\u003e\n```\n\n### 3. Initialize JsonToForm\nIn the footer of your page, after the content, initialize JsonToForm by passing in an object or JSON path, and the selector for the container.\n\n```html\n\u003cscript\u003e\n    var form1 = new JsonToForm({\n        data: './src/data.json',\n        container: '#form1'\n    })\n\n    // OR\n\n    var form1 = new JsonToForm({\n        data: {\n            options: {\n                action: 'submit.php'\n            },\n            fields: [\n                {\n                    name: 'name',\n                    placeholder: 'Enter your name'\n                },\n                {\n                    name: 'email',\n                    placeholder: 'Enter a valid email address',\n                    type: 'email'\n                },\n                {\n                    name: 'options',\n                    type: 'checkbox',\n                    data: [\n                        {title: 'aaa'},\n                        {title: 'bbb'},\n                        {title: 'ccc'},\n                    ]\n                }\n            ]\n        },\n        container: '#form1'\n    })\n\u003c/script\u003e\n```\n\n## License\nThe code is available under the [MIT License](LICENSE.txt).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fisraeljunior%2Fjson-to-form","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fisraeljunior%2Fjson-to-form","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fisraeljunior%2Fjson-to-form/lists"}