I'm trying to set up a Drupal Webform that will (among other things), automatically update a custom date field in the connected CiviCRM contact record. The date field in the webform is hidden, and I'm using Drupal Tokens to generate the date/time when the form is submitted; in the webform results I see the correctly generated date and time, but it isn't then passed to the custom date field in the contact record. (I've tried this with both date & time and date being recorded in the CiviCRM custom field, and with different date tokens generated by the webform - none seem to work).

I'm assuming that the webform is generating a date format that can't be interpreted by the custom field, but I can't see a way to match them up.

Other custom fields filled in via the webform are being populated correctly (I haven't tested this extensively).

I'm using Drupal 7.59 and CiviCRM 5.0.2

1 Answer 1


We're using dates in this example (custom fields on the grant entity) - I just checked - these dates are working properly:

enter image description here

enter image description here

So try this: set the date field to NOW -> using the method I described here: How can I create early bird fees with Webform CiviCRM? -> for your Date fields;

Let me know if that works.

  • Oooh, okay - I'd tried 'now' but that must have been after I made it a hidden field, so it just said 'now' in the results. Keeping it as a Date field limited to 'now' and setting it to 'private' works fine (I don't mind if logged-in users see the date field, as they'll know why it's there). Thank you!
    – liblogger
    May 8, 2018 at 10:13
  • If you want it hidden - then just hide it with CSS! May 8, 2018 at 13:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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