{"id":20461059,"url":"https://github.com/ericgj/d3-form","last_synced_at":"2026-04-20T14:32:25.793Z","repository":{"id":18403971,"uuid":"21585553","full_name":"ericgj/d3-form","owner":"ericgj","description":"Simple modular HTML forms using d3","archived":false,"fork":false,"pushed_at":"2015-01-28T18:14:42.000Z","size":364,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-05T11:34:19.820Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/ericgj.png","metadata":{"files":{"readme":"Readme.md","changelog":"History.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-07-07T20:28:07.000Z","updated_at":"2015-01-28T18:14:42.000Z","dependencies_parsed_at":"2022-09-02T06:44:16.485Z","dependency_job_id":null,"html_url":"https://github.com/ericgj/d3-form","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/ericgj/d3-form","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericgj%2Fd3-form","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericgj%2Fd3-form/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericgj%2Fd3-form/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericgj%2Fd3-form/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ericgj","download_url":"https://codeload.github.com/ericgj/d3-form/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericgj%2Fd3-form/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32050899,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-20T11:35:06.609Z","status":"ssl_error","status_checked_at":"2026-04-20T11:34:48.899Z","response_time":94,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":[],"created_at":"2024-11-15T12:23:02.511Z","updated_at":"2026-04-20T14:32:25.776Z","avatar_url":"https://github.com/ericgj.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# d3-form\n\n  Simple modular HTML forms using d3\n\n  * Declarative form builder syntax\n  * Input binding abstracted from DOM events\n  * Composable\n  * Simple interface for custom input components\n  * Dynamic (data-driven) component generation\n  \n## Installation\n\n  Install with [component(1)](http://component.io):\n\n    $ component install ericgj/d3-form\n\n  Note this library has an implicit dependency on d3. That is, it assumes a\n  `d3` global.\n\n## Example\n\n```js\n  var form = require('d3-form');\n  var data = { name: \"Aaron\", age: 51, color: \"red\" };\n\n  d3.select('div.form').call( \n    form().data( data )\n      .onInput( model, 'set' )\n      .onSubmit( submitHandler )\n      .fieldset( 'stats', \n        ['name',  inputText('name').label('Name')],\n        ['age',   inputText('age').label('Age')],\n        ['color', inputText('color').label('Favorite Color')]\n      )\n      .submit('Save')\n  )\n\n```\nFor a more feature-filled example, see `examples/index.html`.\n\n\n### Data binding\n\nFor so-called \"double-binding\" you can simply call the form again passing\nin the changed data.\n\n```js\n\n  // form input bound to model\n\n  myForm.onInput( someModel, 'set' );\n\n  // external model changes bound to form\n\n  someModel.on('update', function(){ \n    d3.select('div.form').call( myForm.data(someModel.currentData()) );\n  });\n\n```\n\nNote it's up to you how your models are connected to the data you send into\nthe form, and how they expect events to be handled.\n\n## API\n\n  \n## TODO\n\n  - Document API\n  - Document how to write input components\n  - Document dynamic field generation\n\n  \n## License\n\n  The MIT License (MIT)\n\n  Copyright (c) 2014 Eric Gjertsen `\u003cericgj72@gmail.com\u003e`\n\n  Permission is hereby granted, free of charge, to any person obtaining a copy\n  of this software and associated documentation files (the \"Software\"), to deal\n  in the Software without restriction, including without limitation the rights\n  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n  copies of the Software, and to permit persons to whom the Software is\n  furnished to do so, subject to the following conditions:\n\n  The above copyright notice and this permission notice shall be included in\n  all copies or substantial portions of the Software.\n\n  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n  THE SOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fericgj%2Fd3-form","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fericgj%2Fd3-form","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fericgj%2Fd3-form/lists"}