<?php

use Contao\DC_Table;

/**
 * Table tl_form_submissions_data 
 */
$GLOBALS['TL_DCA']['tl_form_submissions_data'] = array
    (
    // Config
    'config' => array
        (
        'dataContainer' => DC_Table::class,
        'ptable' => 'tl_form_submissions',
        'closed' => true,
        'notEditable' => true,
        'sql' => array
            (
            'keys' => array
                (
                'id' => 'primary',
                'pid' => 'index'
            )
        )
    ),
    // Palettes
    'palettes' => array
        (
        'default' => '{data_legend},data;'
    ),
    // Fields
    'fields' => array
        (
        'id' => array
            (
            'sql' => "int(10) unsigned NOT NULL auto_increment"
        ),
        'pid' => array
            (
            'label' => &$GLOBALS['TL_LANG']['tl_form_submissions_data']['pid'],
            'foreignKey' => 'tl_form_submissions.form_title',
            'sql' => "int(10) unsigned NOT NULL default '0'",
            'relation' => array('type' => 'belongsTo', 'load' => 'eager')
        ),
        'form_id' => array
            (
            'label' => &$GLOBALS['TL_LANG']['tl_form_submissions_data']['form_id'],
            'foreignKey' => 'tl_form.id',
            'sql' => "int(10) unsigned NOT NULL default '0'",
            'relation' => array('type' => 'belongsTo')
        ),
        'tstamp' => array
            (
            'label' => &$GLOBALS['TL_LANG']['tl_form_submissions']['tstamp'],
            'filter' => true,
            'sorting' => true,
            'flag' => 6,
            'sql' => "int(10) unsigned NOT NULL default '0'"
        ),
        'subject' => array
            (
            'label' => &$GLOBALS['TL_LANG']['tl_form_submissions_data']['subject'],
            'exclude' => true,
            'search' => true,
            'sql' => "varchar(1024) NOT NULL default ''"
        ),
        'data' => array
            (
            'label' => &$GLOBALS['TL_LANG']['tl_form_submissions_data']['data'],
            'exclude' => true,
            'search' => true,
            'inputType' => 'textarea',
            'eval' => array('rte' => 'tinyMCE', 'tl_class' => 'clr'),
            'sql' => "text NULL"
        ),
        'arrSubmitted' => array
            (
            'label' => &$GLOBALS['TL_LANG']['tl_form_submissions_data']['arrSubmitted'],
            'search' => false,
            'sql' => "text NULL"
        ),
        'arrLabels' => array
            (
            'label' => &$GLOBALS['TL_LANG']['tl_form_submissions_data']['arrLabels'],
            'search' => false,
            'sql' => "text NULL"
        ),
        'arrFields' => array
            (
            'label' => &$GLOBALS['TL_LANG']['tl_form_submissions_data']['arrFields'],
            'search' => false,
            'sql' => "text NULL"
        ),
    )
);
