Results 1 to 5 of 5

Thread: Calendarfield in registration form?

  1. #1
    New user
    Join Date
    07-03-09.
    Posts
    15

    Default 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!

  2. #2
    User
    Join Date
    06-19-09.
    Posts
    328

    Default Re: Calendarfield in registration form?

    Are you talking about the dateOfBirth field?
    Consulenza Contao CMS https://www.intco.it

  3. #3
    New user
    Join Date
    07-03-09.
    Posts
    15

    Default Re: Calendarfield in registration form?

    I am indeed

  4. #4
    User
    Join Date
    06-19-09.
    Posts
    328

    Default 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
    Consulenza Contao CMS https://www.intco.it

  5. #5
    New user
    Join Date
    07-03-09.
    Posts
    15

    Default Re: Calendarfield in registration form?

    Works perfectly!
    Thank you :mrgreen:

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •