Password
What is the Form Password?
The password form type is a single-line input whose characters are masked as they are typed. It can restrict the input to digits only, allow or forbid special characters, and enforce a character-count range.
Options
Allow special characters
- Editor label: Allow special characters. Property
passwordInputSpecialChars. - Values: enabled / disabled. Default: disabled.
- When disabled:
- The on-screen keyboard has its special-character keys turned off.
- If a special character appears in the value, the field is marked invalid with the message
No special character allowed!.
- When enabled, special characters are accepted.
- The special-character set is: space and
`,!,@,#,$,%,^,&,*,(,),_,+,-,=,[,],{,},;,',:,",\,|,,,.,<,>,/,?,~.
Allow only numbers
- Editor label: Allow only numbers. Property
passwordInputOnlyNumbers. - Values: enabled / disabled. Default: disabled.
- When enabled:
- Any non-digit character is stripped from the value as it is typed.
- The on-screen keyboard is switched to a numeric numpad.
- A Set Form message carrying a non-numeric value is ignored.
Minimum characters
- Editor label: Minimum characters. Property
passwordInputMinChars. - The lowest number of characters the value may contain to be considered valid.
- Numeric range: 1 - 64, step 1. Default: 6.
Maximum characters
- Editor label: Maximum characters. Property
passwordInputMaxChars. - The highest number of characters the value may contain to be considered valid.
- Numeric range: 1 - 64, step 1. Default: 16.
- The character-count check is only performed when Maximum characters is greater than Minimum characters. If Maximum is less than or equal to Minimum, no length validation is applied.
Masked input
- The input is a native password field, so every character is rendered as a masked dot.
- There is no built-in show / hide (reveal) toggle.
- The password field does not provide the speech-to-text input icon that some other field types offer.
Setting Mock Field and Own Value
- Writing only happens in the displayer; in the editor it is disabled.
- On each write the field calls the SDK to set its own value and writes its value to the bound form-output datasource, together with these properties:
allowSpecial,minChars, andmaxChars. - Writes are debounced by 200 ms.
- A write is triggered when:
- The widget is rendered (after any initial datasource value is restored).
- The input changes (on every keystroke).
- The input loses focus (on blur).
- An external message updates the field.
Validation
- The password field validates by character count (only when Maximum characters is greater than Minimum characters) and by character content.
- If the value is shorter than Minimum characters, the field is invalid and the message
Too few character! Minimum {min} required!is produced. - If the value is longer than Maximum characters, the field is invalid and the message
Too much character! Maximum {max} allowed!is produced. - If special characters are not allowed and the value contains one, the field is invalid and the message
No special character allowed!is produced. - When Allow only numbers is enabled, non-digit characters are removed from the value rather than reported as an error.
- An empty value clears the validation state and any error.
- How the result is surfaced depends on the common Error settings:
- Validate Field must be enabled for the validity to be written to the form summary and for the
{FORM-NAME}-validsensor event to be sent. - Show Validation adds a colored border indicating validity.
- Show error messages displays the error text under the field while the value is invalid.
- Validate Field must be enabled for the validity to be written to the form summary and for the
Sensor Events
The password field can send two sensor events. {FORM-NAME} is the name assigned to the field.
-
{FORM-NAME}- Value: the current field value.
- Triggered each time the field writes to the Mock datasource (render, input change, blur, external message), unless the triggering external command is a silent one.
-
{FORM-NAME}-valid- Value:
trueorfalse, the result of validation. - Triggered only when Validate Field is enabled, after each validation check (debounced 150 ms).
- Value:
External Messages
The password field listens to the basic form commands:
- Set Form: reads the
valueparameter from the message.- If it is missing or not a string, the message is ignored and the field is left unchanged.
- If Allow only numbers is enabled and the value is not numeric, the message is ignored.
- Otherwise the input is set to that value, validated, and written to the Mock and own value.
- Reset Form / Clear Form: empty the input and update the validation, Mock, and own value.
- The silent variants (
silentResetForm,silentClearForm) do the same but suppress the value sensor event.
Value from Datasource
The password field does not accept a list of options from a datasource. On render it reads any existing value stored under its field name in the bound form-output datasource and pre-fills the input with it.