{"id":21073904,"url":"https://github.com/lambus-platform/titanium-growing-form","last_synced_at":"2025-05-16T06:30:56.979Z","repository":{"id":33172187,"uuid":"153909288","full_name":"lambus-platform/titanium-growing-form","owner":"lambus-platform","description":"A growing (aka \"stepper\") form for Appcelerator Titanium.","archived":false,"fork":false,"pushed_at":"2022-12-08T03:17:33.000Z","size":624,"stargazers_count":16,"open_issues_count":7,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2023-12-23T15:30:01.305Z","etag":null,"topics":["appcelerator","form","javascript","native","titanium"],"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/lambus-platform.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":"2018-10-20T13:38:30.000Z","updated_at":"2022-10-28T18:56:51.000Z","dependencies_parsed_at":"2022-08-17T18:35:21.890Z","dependency_job_id":null,"html_url":"https://github.com/lambus-platform/titanium-growing-form","commit_stats":null,"previous_names":[],"tags_count":7,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lambus-platform%2Ftitanium-growing-form","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lambus-platform%2Ftitanium-growing-form/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lambus-platform%2Ftitanium-growing-form/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lambus-platform%2Ftitanium-growing-form/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lambus-platform","download_url":"https://codeload.github.com/lambus-platform/titanium-growing-form/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225411519,"owners_count":17470245,"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":["appcelerator","form","javascript","native","titanium"],"created_at":"2024-11-19T19:13:37.207Z","updated_at":"2024-11-19T19:13:37.934Z","avatar_url":"https://github.com/lambus-platform.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Growing (\"Stepper\") Form for Titanium\n\n\u003cimg src=\"./screenshots/screenshot.png\" width=\"900\" alt=\"Example\" /\u003e\n\nA form that expands / collapses based on the current input field. Also known as \"growing form\" or \"stepper form\".\n\n## Requirements\n\n- [x] Titanium SDK (`npm i titanium`)\n- [x] ES6+ enabled (`\u003ctranspile\u003etrue\u003c/transpile\u003e`)\n\n## Installation\n\n1. Via npm: `npm i ti.growingform`\n2. Manually: Copy to `app/lib/` (Alloy) or `Resources/` (classic)\n\n## Example\n\n```js\nimport { GrowingForm, GrowingFormValidationRule, GrowingFormFieldType } from 'ti.growingform';\n\nconst config = {\n\tcells: [{\n\t\ttitle: 'Your Username',\n\t\tidentifier: 'username',\n\t\ttype: GrowingFormFieldType.TEXT,\n\t\tvalidate: GrowingFormValidationRule.LIVE,\n\t\tthrottle: handleUsernameThrottle,\n\t\toptions: {\n\t\t\thintText: 'Enter username ...'\n\t\t}\n\t}, {\n\t\ttitle: 'Your Mail address',\n\t\tidentifier: 'email',\n\t\ttype: GrowingFormFieldType.TEXT,\n\t\tvalidate: GrowingFormValidationRule.EMAIL,\n\t\toptions: {\n\t\t\tkeyboardType: Ti.UI.KEYBOARD_TYPE_EMAIL,\n\t\t\thintText: 'Enter mail address ...'\n\t\t}\n\t}, {\n\t\ttitle: 'Your Password',\n\t\tidentifier: 'password',\n\t\ttype: GrowingFormFieldType.TEXT,\n\t\tvalidate: value =\u003e {\n\t\t\t// CREDITS: https://www.thepolyglotdeveloper.com/2015/05/use-regex-to-test-password-strength-in-javascript/\n\t\t\tconst strongRegex = new RegExp(\"^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[!@#\\$%\\^\u0026\\*])(?=.{8,})\");\n\t\t\treturn strongRegex.test(value);\n\t\t},\n\t\toptions: {\n\t\t\tpasswordMask: true,\n\t\t\thintText: 'Enter password ...'\n\t\t}\n\t}],\n\toptions: {\n    \t\t// Style the underlaying table-view via it's header-view\n    \t\ttableTopMargin: 50,\n\n\t\t// Bullets\n\t\tbulletInactiveBackgroundColor: '#666',\n\t\tbulletInactiveTextColor: '#fff',\n\t\tbulletActiveBackgroundColor: '#000',\n\t\tbulletActiveTextColor: '#fff',\n\n\t\t// Step button (aka \"Continue\")\n\t\tstepButtonTitle: L('Continue', 'Continue'),\n\t\tstepButtonBackgroundColor: '#333',\n\t\tstepButtonTextColor: '#fff',\n\t\tstepButtonBorderRadius: 20,\n\n\t\t// Step button (aka \"Submit\")\n\t\tsubmitButtonTitle: L('Submit', 'Submit'),\n\t\tsubmitButtonBackgroundColor: 'orange',\n\t\tsubmitButtonTextColor: '#fff',\n\t\tsubmitButtonBorderRadius: 20\n\t},\n\toverrides: {\n\t\t// backgroundColor: 'green'\n\t} \n};\n\nfunction handleUsernameThrottle(textField, submitButton) {\n\t// Do a HTTP request to validate the text-field value\n \t// and enable / disable the submit button as below\n\tsubmitButton.enabled = true;\n\tsubmitButton.opacity = 1.0\n}\n\nconst growingForm = new GrowingForm({ configuration: config });\n\ngrowingForm.on('submit', data =\u003e {\n\tTi.API.info(`Finished form! Data: ${JSON.stringify(data)}`)\n});\n\ngrowingForm.on('step', (textField, index, isValid) =\u003e {\n  Ti.API.info(`Stepped to ${index}, valid = ${isValid}`);\n});\n\ngrowingForm.render({ view: $.index });\n```\n\n## API\n\nAll methods and properties are accessed from the `GrowingForm` instance\n\n### Methods\n\n|   Name   | Arguments  |   Description  |\n|----------|------------|----------------|\n| lock     |            | Locks the form |\n| unlock   |            | Unlocks the form |\n| openStep | identifier | Moves back to a step, crawled by it's identifier |\n| focus    |            | Focuses the current field (only if the field is a text-field) |\n| blur     |            | Blurs the current field (only if the field is a text-field) |\n| submit   |            | Submits the form programmatically |\n\n## License\n\nMIT\n\n## Author\n\nHans Knöchel (Lambus GmbH)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flambus-platform%2Ftitanium-growing-form","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flambus-platform%2Ftitanium-growing-form","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flambus-platform%2Ftitanium-growing-form/lists"}