Results 1 to 4 of 4

Thread: About DCA and subpalettes

  1. #1
    User
    Join Date
    11-23-09.
    Location
    Valais, Switzerland
    Posts
    77

    Default About DCA and subpalettes

    Hello,

    Just a question about DCA and subpalettes. I try to use this system on a form, it is not really working because at load the subpalettes is displayed (and checkbox not checked*!?). After a click it is ok. What did I wrong*?

    Thanks

    At load, not ok. (subpalette loaded but checkbox not checked)


    After a click ok. (subpalette not loaded)


    After 2nd click ok. (subpalette loaded)


    My DCA code*:

    'palettes' => array
    (
    '__selector__' => array('hour_mode' ),
    'default' => 'some before... ;{date_legend:hide},start_date,hour_mode; some after...'

    ),
    'subpalettes' => array
    (
    'hour_mode' => 'start_time,end_time',
    ),
    'fields' => array
    (


    'hour_mode' => array
    (
    'label' => &$GLOBALS['TL_LANG']['tl_rdv_group']['hour_mode_active'],
    'exclude' => true,
    'inputType' => 'checkbox',
    'eval' => array('submitOnChange'=>true)
    ),
    'start_time' => array
    (
    'label' => &$GLOBALS['TL_LANG']['tl_rdv_group']['start_time'],
    'exclude' => true,
    'default' => date('H', time()) * 3600,
    //'default' => 3600,
    'inputType' => 'text',
    'flag' => 8,
    'eval' => array('rgxp' => 'time', 'tl_class' => 'w50')
    ),
    'end_time' => array
    (
    'label' => &$GLOBALS['TL_LANG']['tl_rdv_group']['end_time'],
    'exclude' => true,
    'default' => date('H', time()) * 3600 + 3600, //more one hour than start by default
    'inputType' => 'text',
    'flag' => 8,
    'eval' => array('rgxp' => 'time')
    ),

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

    Default Re: About DCA and subpalettes

    Looks fine to me.

    I've seen it before when checkboxes use 'default'=>false.
    Maybe also check your entire default palette for missing/extra commas,semi-colons etc.

  3. #3

    Default Re: About DCA and subpalettes

    Code:
    'hour_mode' => array
    	(
    			'label'	=> &$GLOBALS['TL_LANG']['tl_rdv_group']['hour_mode_active'],
    			'exclude'	=> true,
    			'inputType'	=> 'checkbox',
    			'default'	=> '',
    			'eval'		=> array('submitOnChange'=>true)
    	),
    'default' => '', should do the trick, and for database field definition
    Code:
      `hour_mode` char(1) NOT NULL default '',
    OM MANI PEME HUNG! how many has to die for freedom and dignity. Save this world

  4. #4
    Experienced user
    Join Date
    01-12-10.
    Posts
    814

    Default Re: About DCA and subpalettes

    answered in wrong topic. sorry

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
  •