docs: function ImmutableCoreModelFormInstance (args) {
      // new instance is based on original
      _.merge(this, args.form)
      // deep clone nested data structures
      this.fields = _.cloneDeep(args.form.fields)
      // delete from args so other values can be merged
      delete args.form
      // if record is passed init form values from model instance
      if (args.record) {
          this.initRecord(args.record)
          // delete from args so other values can be merged
          delete args.record
      }
      // if there was input with errors init form with those values
      else if (args.error) {
          this.initInput(args.input, args.error)
          // delete from args so other values can be merged
          delete args.error
          delete args.input
      }
      // if there is only input then init form with pre-fill values
      else if (args.input) {
          this.initInput(args.input)
          // delete from args so other values can be merged
          delete args.input
      }
      // merge remaining args to form
      mergeArgs(this, args)
      // if new instance is in udpate mode and model does not have a parentId
      // column then it cannot be update so disable all fields
      if (args.mode === 'update' && !this.model.columnName('parentId')) {
          // disable all fields
          _.each(this.fields, field => {
              field.readonly = true
          })
          // disable submit
          this.submit = false
      }
  }