Results 1 to 3 of 3

Thread: Calendarfield extension

  1. #1
    User
    Join Date
    02-01-10.
    Posts
    111

    Default Calendarfield extension

    I installed calendarfield extension and I would like to store the calendarfield form data in a sql table. I believe I need to create a SQL table for my form where the data is stored and then create fields to correspond to each of the form data fields. What are the field names and types that I need to create in order to store calendarfield data?

    I have tried a few versions, but so far have not been successful.

    Thank you,
    Tonu

  2. #2
    User
    Join Date
    02-01-10.
    Posts
    111

    Default Re: Calendarfield extension

    Looks like I figured it out. The SQL field name needs to match the field name for the front end form field name (naturally). The field type is text. When I selected the field type to be date, it did not save the data. Please correct me if I am wrong.

  3. #3
    Experienced user
    Join Date
    06-20-09.
    Posts
    1,311

    Default Re: Calendarfield extension

    In your database use int(10).
    Contao stores dates as Unix timestamps, and formats them according to the date and time settings you choose in Settings.

    In the Form Generator the field type to choose is "calendarfield" which lets you choose a date format (eg: Y-m-d) and date direction (eg: only future dates), but it still stores everything as a 10 digit timestamp.

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
  •