build() {
    if (!this.instance) {
      return Promise.reject(this.t('formNotReady'));
    }

    if (!this.element) {
      return Promise.reject(this.t('noFormElement'));
    }

    // Add temporary loader.
    const template = (this.options && this.options.template) ? this.options.template : 'bootstrap';
    const loader = templates[template].loader || templates.bootstrap.loader;
    this.setContent(this.element, loader.form);

    return this.render().then(html => {
      this.setContent(this.element, html);
      return this.attach(this.element).then(() => this.instance);
    })
      .then((param) => {
        this.emit('build', param);
        return param;
      });
  }
Build a new form.
@returns {Promise<Webform|Wizard|PDF>} - The form instance that was created.