Closed (fixed)
Project:
Webform
Version:
5.x-1.3
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
12 Jun 2007 at 03:06 UTC
Updated:
28 Jun 2007 at 03:16 UTC
Hi,
My apologies if this is a duplicate post, I've done a search but I could have missed the answer to my question.
I have a webform set up with a date field set to default to Date of Birth from my user's profile. However, no matter what the user's date of birth actually is, webform defaults always to January 1, 1970.
Happy for any help!
Comments
Comment #1
vm commentedPHP defaults to 1970 , dates before 1970 will not work without the adodb date library from
http://phplens.com/phpeverywhere/adodb_date_library, I the adodb library with the date.module. I do not know if webform works with it.
Comment #2
quicksketchI think I understand the scenario here, but could you tell me exactly how your profile field for date of birth and the webform field trying to use it are configured?
Comment #3
pnc999 commentedTo VeryMisunderstood, thanks for your post. Unfortunately I wasn't even trying with people born before 1970 so I do not think this fix will work for my situation.
To quicksketch: the profile field for Date of birth is profile_dob and in my webform I have created a data element = date with the default of %profile[profile_dob]. Is this enough information? Let me know if you need more!
Comment #4
pnc999 commentedHere's a bit more information about my webform configuration:
The Timezone = Website Timezone which is set to GMT + 1000 (Australia)
Don't know if that is helpful or not, just thought I'd put it in!
Comment #5
quicksketchThanks pnc999, that's just what I was looking for. I'll try to reproduce and see if something is misbehaving in the use of profile fields.
Comment #6
quicksketchIt doesn't look like webform ever translated date fields from profile module into the default value for webform date components. I've added this feature so that it can take %profile[profile_dob] (or other date fields) and use them as the default value. Profile dates also didn't work in descriptions, which I've also fixed.
Comment #7
pnc999 commentedThanks quicksketch - that has fixed that issue nicely.
Comment #8
(not verified) commented