Security News
Node.js EOL Versions CVE Dubbed the "Worst CVE of the Year" by Security Experts
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
ti.growingform
Advanced tools
A form that expands / collapses based on the current input field. Also known as "growing form" or "stepper form".
npm i titanium
)<transpile>true</transpile>
)npm i ti.growingform
app/lib/
(Alloy) or Resources/
(classic)import { GrowingForm, GrowingFormValidationRule, GrowingFormFieldType } from 'ti.growingform';
const config = {
cells: [{
title: 'Your Username',
identifier: 'username',
type: GrowingFormFieldType.TEXT,
validate: GrowingFormValidationRule.LIVE,
throttle: handleUsernameThrottle,
options: {
hintText: 'Enter username ...'
}
}, {
title: 'Your Mail address',
identifier: 'email',
type: GrowingFormFieldType.TEXT,
validate: GrowingFormValidationRule.EMAIL,
options: {
keyboardType: Ti.UI.KEYBOARD_TYPE_EMAIL,
hintText: 'Enter mail address ...'
}
}, {
title: 'Your Password',
identifier: 'password',
type: GrowingFormFieldType.TEXT,
validate: value => {
// CREDITS: https://www.thepolyglotdeveloper.com/2015/05/use-regex-to-test-password-strength-in-javascript/
const strongRegex = new RegExp("^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[!@#\$%\^&\*])(?=.{8,})");
return strongRegex.test(value);
},
options: {
passwordMask: true,
hintText: 'Enter password ...'
}
}],
options: {
// Style the underlaying table-view via it's header-view
tableTopMargin: 50,
// Bullets
bulletInactiveBackgroundColor: '#666',
bulletInactiveTextColor: '#fff',
bulletActiveBackgroundColor: '#000',
bulletActiveTextColor: '#fff',
// Step button (aka "Continue")
stepButtonTitle: L('Continue', 'Continue'),
stepButtonBackgroundColor: '#333',
stepButtonTextColor: '#fff',
stepButtonBorderRadius: 20,
// Step button (aka "Submit")
submitButtonTitle: L('Submit', 'Submit'),
submitButtonBackgroundColor: 'orange',
submitButtonTextColor: '#fff',
submitButtonBorderRadius: 20
},
overrides: {
// backgroundColor: 'green'
}
};
function handleUsernameThrottle(textField, submitButton) {
// Do a HTTP request to validate the text-field value
// and enable / disable the submit button as below
submitButton.enabled = true;
submitButton.opacity = 1.0
}
const growingForm = new GrowingForm({ configuration: config });
growingForm.on('submit', data => {
Ti.API.info(`Finished form! Data: ${JSON.stringify(data)}`)
});
growingForm.on('step', (textField, index, isValid) => {
Ti.API.info(`Stepped to ${index}, valid = ${isValid}`);
});
growingForm.render({ view: $.index });
All methods and properties are accessed from the GrowingForm
instance
Name | Arguments | Description |
---|---|---|
lock | Locks the form | |
unlock | Unlocks the form | |
openStep | identifier | Moves back to a step, crawled by it's identifier |
focus | Focuses the current field (only if the field is a text-field) | |
blur | Blurs the current field (only if the field is a text-field) | |
submit | Submits the form programmatically |
MIT
Hans Knöchel (Lambus GmbH)
FAQs
A growing ("stepper") form for Appcelerator Titanium.
We found that ti.growingform demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.