Hi,
I tested EntityForms 2.0 beta 2 on a completely freah and clean Drupal 7.24 with only the latest modules required to run Entityform. No other unneccessary modules are installed for a complete and clean testing.
I created a new form type even without any date field, every time when I clicked submit, the following errors on Date occur.
I tried creating 2 Test Content Types with date and without date field respectively, no errors on posting. Only happen with EntityForms Type.

entityformdatebug

CommentFileSizeAuthor
entitydatebug.PNG14.78 KBjetwodru

Comments

tedbow’s picture

@jetwong98 ok thanks for reporting this.

cutmedia’s picture

the error only appears when in the form Submission page settings > Preview page is checked

tedbow’s picture

@cutmedia, thanks for the info. It will make debugging easier.

akeimou’s picture

i also have Preview enabled. created date in $entityform is empty so the warning disappears when:

- format_date in function defaultLabel is changed to date("Y-m-d H:i:s")

- format_date in function _entityform_get_submit_info is changed to date("Y-m-d H:i:s"). also, the submission display no longer shows a blank date after "Submitted by Anonymous on"

is there a different field to use instead of $entityform->created when form is in draft?

tedbow’s picture

Version: 7.x-2.0-beta2 » 7.x-2.x-dev
Status: Active » Fixed

I have found the problem. It was because the created date and user id wasn't set before the preview submission value was set. I just moved the code up.

I committed this change to 7.x-2.x

tedbow’s picture

#akeimou in response to your question in #4 :

is there a different field to use instead of $entityform->created when form is in draft?

No $entityform->created is set the first time the form is submitted even if it is draft.

If you want to discuss that please create another issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.