dongxu7121 2015-01-22 12:32
浏览 26
已采纳

保存后复选框为空

i have a problem extending an existing extension (tt_products) in typo3. I edited the tca.php of the extension and wrote the new field "panelshapes" into it. This generated a field with multiple selectable checkboxes. Furthermore i created the field in DB with fieldtype "mediumtext".

When i now go to typo3 backend and create a new content element i can see the new field, in this case 6 checkboxes. I can select a few checkboxes, click "save and close content element" an the values will be written in Database correctly. When i reopen the created content element in Backend all checkboxes are empty again, allthough the value are saved in DB. Anyone an idea about this?

It's typo3 6.2.9, php 5.4, MySQL 5

'panelshapes' => array(
            'label' => 'LLL:EXT:'.TT_PRODUCTS_EXT.'/locallang_db.xml:tt_products.panelshapes',
                'config' => array(
                    'type' => 'select',
                    'size' => 6,
                    'renderMode' => 'checkbox',
                    'minitems' => 0,
                    'maxitems' => 6,
                    'enableMultiSelectFilterTextfield' => TRUE,
                    'items' => array (
                        array('Gerade', ' Gerade', '',' Gerade'),
                        array('Durchsicht', ' Durchsicht', '',' Durchsicht'),
                        array('U-Form',  ' U-Form', '',' U-Form'),
                        array('L-Form',  ' L-Form', '',' L-Form'),
                        array('Rund',  ' Rund', '',' Rund'),
                        array('Prisma', ' Prisma', '',' Prisma'),
                    ),
                ),
            ),
  • 写回答

1条回答 默认 最新

  • douti0467 2015-01-22 14:10
    关注

    The values in your items contain spaces, as far as I'm aware the DB Values are exploded by GeneralUtility::trimExplode() which will remove them.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 MCNP里如何定义多个源?
  • ¥20 双层网络上信息-疾病传播
  • ¥50 paddlepaddle pinn
  • ¥20 idea运行测试代码报错问题
  • ¥15 网络监控:网络故障告警通知
  • ¥15 django项目运行报编码错误
  • ¥15 请问这个是什么意思?
  • ¥15 STM32驱动继电器
  • ¥15 Windows server update services
  • ¥15 关于#c语言#的问题:我现在在做一个墨水屏设计,2.9英寸的小屏怎么换4.2英寸大屏