2

I'm using CIVICRM Webform on Drupal 9, I'm trying to capture some date fields using Date List and or Date/Time, instead of the regular Date field, because of some strange issues on older browsers, (probably because of HTML5 incompatibility)

The month and the day are captured correctly, but the year is registering 0400, instead of the correct year.

I've tried it for Birth Date and Custom Date Fields, and both are showing 0400 as the year. The format is dd-mm-yyyy

Any assistance would be appreciated.

P.S. The webform result is capturing the correct year, but in CIVICRM it is not.

2

CiviCRM Custom fields configured as Data Type = Date all get added to Webform build tab as:

  civicrm_1_contact_1_cg22_custom_59:
    '#type': date
    '#data_type': Date

Ah you're then retyping that to a Date List field in the UI?

Yep - I see the issue. This will require a code fix. This particular field mapping just doesn't exist yet.

I do like the idea of supporting Date List type of fields and would be happy to welcome a code fix/PR or alternatively you can also sponsor this feature and either myself or one of my team can work on it.

AD-hoc: ah it looks like one of our Partner/clients hit the same issue -> Fuzion has submitted a PR -> https://github.com/colemanw/webform_civicrm/pull/635 - if you can help test/review this then we can get it merged quickly.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.