boltforms icon indicating copy to clipboard operation
boltforms copied to clipboard

[BUG] Date field not converted to string for insertion into database on form submission

Open tompato opened this issue 8 years ago • 0 comments

Overview

When using a type: date field on a BoltForms form configuration and also setting the form to save to the database - it throws an error stating that the 'Object of class DateTime could not be converted to string'.

Details

BoltForms Version: 4.1.13 Bolt Version:3.3.6 Install type: Composer install PHP version: 7.0 Web server: Apache/2.4.18

Reproduction

BoltForms Configuration

example_form:
  database:
    contenttype: examples
  fields:
    title:
      type: text
    date:
      type: date
    submit:
      type: submit

Contenttypes Configuration

examples:
  name: Examples
  singular_name: Example
  fields:
    title:
      type: text
    date:
      type: date

This configuration should give you the error. Any form with a field of type: date and that saves to the database of a content type should provide the same error though.

This seems like it was raised and fixed in the past with #3459 but maybe with recent refactoring this has crept back in?

tompato avatar Oct 31 '17 11:10 tompato