{"id":19176038,"url":"https://github.com/node4good/forma","last_synced_at":"2025-12-12T04:13:25.058Z","repository":{"id":58221057,"uuid":"11348777","full_name":"node4good/forma","owner":"node4good","description":"Javascript client side \u003cform\u003e generator","archived":false,"fork":false,"pushed_at":"2013-08-28T16:14:20.000Z","size":384,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-08-12T22:56:38.294Z","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/node4good.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}},"created_at":"2013-07-11T17:54:32.000Z","updated_at":"2014-07-06T05:42:07.000Z","dependencies_parsed_at":"2022-08-31T02:51:14.724Z","dependency_job_id":null,"html_url":"https://github.com/node4good/forma","commit_stats":null,"previous_names":["empeeric/forma"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/node4good/forma","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/node4good%2Fforma","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/node4good%2Fforma/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/node4good%2Fforma/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/node4good%2Fforma/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/node4good","download_url":"https://codeload.github.com/node4good/forma/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/node4good%2Fforma/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279012681,"owners_count":26085159,"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","status":"online","status_checked_at":"2025-10-12T02:00:06.719Z","response_time":53,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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-09T10:27:00.070Z","updated_at":"2025-10-12T19:44:57.053Z","avatar_url":"https://github.com/node4good.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[Forma](http://empeeric.github.io/forma/) - Client-side form generator\n=======\n\n\u003e forma, formae; (f.); form, figure, shape; beautiful shape, beauty (-- Latin-English Dictionary)\n\nQuick and easy javascript form builder. May you never have to write boring, repetitive markup again.\n\n### [Example](http://empeeric.github.io/forma/)\n\n```js\n/*\n Just declare your schema, we'll do the rest\n */\nvar form = new Forma({\n    // simplest: just declare name and type\n    username: 'text',\n    password: 'password',\n\n    // or you can have full control\n    where: {\n        type: 'text',\n        value: 'Shine',\n        required: true,         // jQuery.validate or browser form validation can read this!\n        ready: function(el) {   // You can actually access your element!\n            el.on('click', function() {\n                console.log($(this).val());\n            });\n        },\n        label: 'WHERE?!'        // Or set\n    },\n    select: {\n        type: 'select2',\n        options: ['what', 'where', 'when']\n    },\n    radio: {\n        type: 'radio',\n        options: ['No', 'Yes'],\n        value: 'No'\n    }\n});\n\n// Extend Forma with more field types; e.g. define a reusable select2 field\nForma.fields['select2'] = function(o) {\n    var el = Forma.fields.select.call(this, o);\n\n    setTimeout(function() {\n        el.select2();\n    }, 0);\n\n    return el;\n};\n\n// Forma is happy to play well with Rivets.js, and other data binders\nform.field = function(o) {\n    o['data-value'] = 'model.' + o.name;\n    return Forma.prototype.field(o);\n};\n\n// Easily use bootstrap for your form layout\nform.row = function(label, o) {\n    var row = $('\u003cdiv class=\"control-group\"\u003e' +\n        '\u003clabel class=\"control-label\"\u003e' + label.capitalize() + '\u003c/label\u003e' +\n        '\u003cdiv class=\"controls\"\u003e\u003c/div\u003e' +\n    '\u003c/div\u003e');\n\n    row.find('.controls').append(this.field(o));\n    return row;\n};\n\n// Render the form and append it to the document!\n$('form').prepend(form.render());\n\n// Elements can be accessed later\nform.fields.radio.el[1].on('click', function() {\n    console.log('Tuning radio...')\n});\n```\n\n#### Field types\n- text (`\u003cinput type=\"text\" /\u003e`)\n- password (`\u003cinput type=\"password\" /\u003e`)\n- file (`\u003cinput type=\"file\" /\u003e`)\n- select (`\u003cselect /\u003e`)\n- radio (`\u003cinput type=\"radio\" /\u003e`)\n\n#### Plugins' fields\nSee `plugins.js`. Dependent on the actual plugins.\n- date ([Bootstrap Datepicker](http://www.eyecon.ro/bootstrap-datepicker))\n- slider ([Bootstrap Slider](http://www.eyecon.ro/bootstrap-slider/))\n- select2 ([Select2](http://ivaynberg.github.io/select2/))","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnode4good%2Fforma","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnode4good%2Fforma","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnode4good%2Fforma/lists"}