Forms are wrapped in the FormContainer
component, which styles form elements within.
import live-web.dom
import live-web-view.form
import live-web-view.content
static any[] use = [FormContainer]
FormContainer{
FormGroup{
Label{ T`Email` }
TextInput{ type='email' placeholder='Email Address' name='email' }
}
FormGroup{
Label{ T`Password` }
TextInput{ type='password' placeholder='Password' name='password' }
}
FormGroup{
SubmitButton{ T`Submit` }
}
}
import live-web.dom
import live-web-view.form
import live-web-view.content
static any[] use = [FormContainer]
FormContainer{
FormGroup{
TextInput{ type='email' placeholder='Email Address' name='email' }
}
FormMessage{ visible: true type: 'error'
T`Error: Email address is invalid.`
}
FormGroup{
TextInput{ type='password' placeholder='Password' name='password' }
}
FormMessage{ visible: true type: 'info'
T`Info: Password should be at least 10 characters.`
}
FormGroup{
SubmitButton{ T`Submit` }
}
}