Posts: 339
Threads: 42
Joined: Apr 2010
Reputation:
2
I want to have the user enter their date of birth in a form field on an external form. What is the best way to do this? If I leave a blank text field, people will enter it differently than others.. and if I do three separate fields (day, month, and year), I won't be able to put them together into one field in the database.
Any ideas??
Thanks!
Posts: 2,456
Threads: 39
Joined: Dec 2008
Reputation:
6
Hi Alex,
I *KNOW*! This has been a recurring problem for us too. These days we rely on using a javascript calendar (jQuery UI has a nice one), which stores the info in a single field. That's probably your best approach - both for ensuring that 99% of users will submit the data in the same format, but also for usability's sake (they're very easy to use).
You can use 3 separate fields, but I agree: having them split up in the UI is pretty crumby. What I've done in the past is use the Submission Pre-Parser module to piece together the info to store it in a single field - not great, but passable.
Sorry to keep mentioning the upcoming Form Builder module in my posts (I'm just working on it all the time now), but it'll let automatically insert date, datetime and time fields into your published forms - just like with the FT interface. It'll be released soon. Really. (I'm knee deep in QA right now).
- Ben