Not 100% sure of the API for this yet, but something like this would be helpful:
form('signup', {
classes: {
labels: 'mod-label',
inputs: 'mod-input',
},
rows: [{
fields: [
{ label: 'Email Address', type: 'email', name: 'email_address', placeholder: 'Email Address', value: '', columns: 6 },
{ label: 'Password', type: 'password', name: 'password', placeholder: 'Password', value: '', columns: 6, hint: 'Use at least eight characters, one uppercase letter, one lowercase letter, and a special character.' },
]
}]
})
This would also allow for tracking form instances on the component instance at something like instance.forms.signup which would point to the DOM node for that form for convenience. It may be out of scope, but you could even add a validation schema directly to this that would automate calling to the instance.validate_form() method.
Not 100% sure of the API for this yet, but something like this would be helpful:
This would also allow for tracking form instances on the component instance at something like
instance.forms.signup
which would point to the DOM node for that form for convenience. It may be out of scope, but you could even add avalidation
schema directly to this that would automate calling to theinstance.validate_form()
method.