Calendarfield in registration form?
Hi,
I really like the datepicker in the Typolight offers in the backend. I like to use it in the frontend es-well because people get confuses easily when submitting the form doesn't go well. Calendarfield offers this option but I would like to know if there is a way to also use calendarfield in the standard forms like the registration form?
Thank you!
Re: Calendarfield in registration form?
Are you talking about the dateOfBirth field?
Re: Calendarfield in registration form?
Re: Calendarfield in registration form?
Quote:
Originally Posted by davidn
I am indeed :)
install the calendarfield extension and add the following lines to system/config/dcaconfig.php
Code:
$GLOBALS['TL_DCA']['tl_member']['fields']['dateOfBirth']['inputType'] = 'calendar';
// this can be 0, -1, 1:
/**
* 0: 'Allow all dates';
* 1: 'Only dates in the future';
* -1: 'Only dates in the past';
*/
$GLOBALS['TL_DCA']['tl_member']['fields']['dateOfBirth']['eval']['dateDirection'] = "-1";
EDIT:
added the second line, if missing a javascript error will be thrown
Re: Calendarfield in registration form?
Works perfectly!
Thank you :mrgreen: