Done !
| Server IP : 46.105.57.169 / Your IP : 216.73.216.67 Web Server : Apache System : Linux webm002.cluster120.gra.hosting.ovh.net 6.18.42-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Wed Aug 5 15:59:48 CEST 2026 x86_64 User : verseaumee ( 152031) PHP Version : 8.5.7 Disable Function : _dyuweyrj4,_dyuweyrj4r,dl MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/verseaumee/blueversion/wp-content/plugins/mailchimp-for-wp/assets/src/js/forms/ |
Upload File : |
const serialize = require('form-serialize')
const populate = require('populate.js')
const Form = function (id, element) {
this.id = id
this.element = element || document.createElement('form')
this.name = this.element.getAttribute('data-name') || 'Form #' + this.id
this.errors = []
this.started = false
}
Form.prototype.setData = function (data) {
try {
populate(this.element, data)
} catch (e) {
console.error(e)
}
}
Form.prototype.getData = function () {
return serialize(this.element, { hash: true, empty: true })
}
Form.prototype.getSerializedData = function () {
return serialize(this.element, { hash: false, empty: true })
}
Form.prototype.setResponse = function (msg) {
this.element.querySelector('.mc4wp-response').innerHTML = msg
}
// revert back to original state
Form.prototype.reset = function () {
this.setResponse('')
this.element.querySelector('.mc4wp-form-fields').style.display = ''
this.element.reset()
}
module.exports = Form