{"id":13749270,"url":"https://github.com/caffeinalab/ti.formbuilder","last_synced_at":"2025-12-25T07:52:44.589Z","repository":{"id":153210657,"uuid":"45915982","full_name":"caffeinalab/ti.formbuilder","owner":"caffeinalab","description":"Build forms for Titanium with just an object.","archived":false,"fork":false,"pushed_at":"2019-07-09T13:49:56.000Z","size":19,"stargazers_count":24,"open_issues_count":0,"forks_count":6,"subscribers_count":11,"default_branch":"master","last_synced_at":"2024-08-03T07:03:09.552Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/caffeinalab.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2015-11-10T14:10:20.000Z","updated_at":"2020-10-15T13:06:59.000Z","dependencies_parsed_at":"2024-01-17T13:12:20.092Z","dependency_job_id":"5e18479a-602d-449e-b2fb-059c442a9ca9","html_url":"https://github.com/caffeinalab/ti.formbuilder","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/caffeinalab%2Fti.formbuilder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/caffeinalab%2Fti.formbuilder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/caffeinalab%2Fti.formbuilder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/caffeinalab%2Fti.formbuilder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/caffeinalab","download_url":"https://codeload.github.com/caffeinalab/ti.formbuilder/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224863108,"owners_count":17382279,"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":[],"created_at":"2024-08-03T07:00:58.236Z","updated_at":"2025-12-25T07:52:44.535Z","avatar_url":"https://github.com/caffeinalab.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# Ti.FormBuilder\n\n### com.caffeinalab.titanium.formbuilder\n\n*You're a developer, and the most annoying thing you can do are forms.*\n\nSo, let's build forms with just an object literal.\n\n#### Via Gittio\n\n```\ngittio install com.caffeinalab.titanium.formbuilder\n```\n\n#### Via Github\n\nDownload the latest release and add in your *config.json*, under `dependencies`:\n\n```json\n\"dependencies\": {\n    \"com.caffeinalab.titanium.formbuilder\": \"*\"\n}\n```\n\n#### Usage\n\n```js\nvar form = Alloy.createWidget('com.caffeinalab.titanium.formbuilder', {\n\tfields: [\n\t\t{ name: 'first_name' },\n\t\t{ name: 'last_name' },\n\t\t// See below\n\t]\n});\n```\n\n#### Options\n\n##### `askBeforeSubmit (Boolean)`: Show an option dialog before the real submit\n\n##### `submitTitle (String)`: The title of the submit button\n\n#### Options for the field\n\n##### `name (String)`: The name (ID) of this field\n\n##### `type (String)`: The type of this field\n\nPossible values are:\n\n* `text`\n* `password`\n* `passwordEye`\n* `email`\n* `boolean`\n\n##### `label (String)`: The text of the label to show above the input\n\n##### `group (String)`: A text used to group similar inputs\n\n##### `placeholder (String)`: A placeholder for the input\n\n##### `required (Boolean)`: Indicate the field is required and will throw validation errors\n\n##### `validator (Function)`: A custom validator function.\n\nIt must return `true` if everything's ok, a message string otherwise.\n\n#### Sample fields definition\n\n```\nvar fields = [\n{\n\tname: 'email',\n\ttype: 'email',\n\tlabel: 'EMAIL',\n\tplaceholder: 'mario.rossi@gmail.com',\n\tgroup: 'I tuoi dati di accesso',\n\trequired: true,\n\tvalidator: function(value) {\n\t\tif (!/^[-a-z0-9~!$%^\u0026*_=+}{\\'?]+(\\.[-a-z0-9~!$%^\u0026*_=+}{\\'?]+)*@([a-z0-9_][-a-z0-9_]*(\\.[-a-z0-9_]+)*\\.(aero|arpa|biz|com|coop|edu|gov|info|int|mil|museum|name|net|org|pro|travel|mobi|[a-z][a-z])|([0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}))(:[0-9]{1,5})?$/i.test(value)) {\n\t\t\treturn \"Email non valida\";\n\t\t}\n\t\treturn true;\n\t}\n},\n{\n\tname: 'password',\n\ttype: 'passwordEye',\n\tlabel: 'LA TUA PASSWORD',\n\tplaceholder: 'Password',\n\tgroup: 'I tuoi dati di accesso',\n\trequired: true,\n\tvalidator: function(value) {\n\t\tif (value.length \u003c 8) return \"Inserisci una password di almeno 8 caratteri\";\n\t\treturn true;\n\t}\n},\n{\n\tname: 'first_name',\n\ttype: 'text',\n\tlabel: 'NOME',\n\tplaceholder: 'Mario',\n\trequired: true,\n\tgroup: 'Le tue informazioni personali'\n},\n{\n\tname: 'privacy',\n\ttype: 'boolean',\n\tlabel: 'PRIVACY POLICY',\n\tplaceholder: 'Ho letto e accettato la privacy policy',\n\trequired: true,\n\tgroup: 'Consenso'\n}\n];\n```\n\n#### Fully stylable via Alloy theme\n\nJust overwrite classes with `app/themes/YOURTHEME/com.caffeinalab.titanium.formbuilder/styles/widget.tss`\n\n## Contributing\n\nHow to get involved:\n\n1. [Star](https://github.com/CaffeinaLab/Ti.FormBuilder/stargazers) the project!\n2. Answer questions that come through [GitHub issues](https://github.com/CaffeinaLab/Ti.FormBuilder/issues?state=open)\n3. [Report a bug](https://github.com/CaffeinaLab/Ti.FormBuilder/issues/new) that you find\n\nPull requests are **highly appreciated**.\n\nSolve a problem. Features are great, but even better is cleaning-up and fixing issues in the code that you discover.\n\n## Copyright and license\n\nCopyright 2015 [Caffeina](http://caffeinalab.com) srl under the [MIT license](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcaffeinalab%2Fti.formbuilder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcaffeinalab%2Fti.formbuilder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcaffeinalab%2Fti.formbuilder/lists"}