w2ui
Home
Get started
Demos
Docs
Blog
Support
Layout
Grid
Toolbar
Sidebar
Tabs
Form
Popup
Utilities
ver 1.3
ver 1.4
ver 1.5
ver 2.0
Form
Overview
Events
Properties
Methods
Fields
Numeric
Date & Time
Drop Lists
Multi Selects
Upload
Custom
w2form.confirm
Shows a context confirmation dialog for the form
confirm(options)
options
string|object
, text of the message or additional options
Returns
object
. This method displays a context confirmation dialog.
If you have following form:
let form = new w2form({ name: 'form', formURL: '/server/path', fields: [ { field: 'first_name', type: 'text', required: true }, { field: 'last_name', type: 'text', required: true }, { field: 'email', type: 'email' } ] });
You can
w2ui.form.confirm('Some message.') .yes(event => { console.log('yes', event) }) .no(event => { console.log('no', event) }) .answer(event => { console.log(event.answer event) }) .then(event => { console.log('confirm is ready', event) })
Or
w2ui.form.confirm({ width: 400, height: 200, body: 'Some message' }) .yes(() => { console.log('yes') })
User Comments
Please enable JavaScript to view the
comments powered by Disqus.
comments powered by
Disqus