Constructor
Parameters:
Name |
Type |
Attributes |
Default |
Description |
dataObject |
DataObject
|
<optional>
|
null
|
|
options |
Object
|
<optional>
|
|
see the {@Component} for inherited options
Properties
Name |
Type |
Attributes |
Default |
Description |
heading |
string
|
<optional>
|
null
|
the heading text for this form |
|
- Source:
- To Do:
-
- Create a PasswordInputFieldComponent
- Create a form error display element and per-field error display elements
- Add a `WaitComponent` to show while submitting the form
- Add default Submit/Reset/Clear controls
Example
class SignInComponent extends FormComponent {
constructor(dataObject=null, options={}) {
super(dataObject, Object.assign({
heading: 'Sign-in:'
}, options))
this.addClass('sign-in-component')
this._usernameComponent = new TextInputFieldComponent(
this.dataObject,
{ label: lt('username'), placeholder: lt('Enter your account username') }
).appendTo(this.fieldsComponent)
this._passwordComponent = new PasswordInputFieldComponent(
this.dataObject,
{ label: lt('password'), placeholder: lt('Enter your account password') }
).appendTo(this.fieldsComponent)
}
}