在TYPO3 8.7后端/ TCA中,我试图将建议向导添加到selectMultipleSideBySide
类型的选择字段中。
已经有另外两个向导(添加和编辑)可以工作,而建议不起作用。
'genres' => [
'exclude' => false,
'label' => 'Genres',
'config' => [
'type' => 'select',
'renderType' => 'selectMultipleSideBySide',
'foreign_table' => 'tx_myext_domain_model_genre',
'MM' => 'tx_myext_project_genre_mm',
'size' => 10,
'autoSizeMax' => 30,
'maxitems' => 9999,
'multiple' => 0,
'wizards' => [
'_PADDING' => 1,
'_VERTICAL' => 1,
'edit' => [
'module' => [
'name' => 'wizard_edit',
],
'type' => 'popup',
'title' => 'Edit',
'icon' => 'EXT:backend/Resources/Public/Images/FormFieldWizard/wizard_edit.gif',
'popup_onlyOpenIfSelected' => 1,
'JSopenParams' => 'height=350,width=580,status=0,menubar=0,scrollbars=1',
],
'add' => [
'module' => [
'name' => 'wizard_add',
],
'type' => 'script',
'title' => 'Create new',
'icon' => 'EXT:backend/Resources/Public/Images/FormFieldWizard/wizard_add.gif',
'params' => [
'table' => 'tx_myext_domain_model_genre',
'pid' => '###CURRENT_PID###',
'setValue' => 'prepend'
],
],
'suggest' => [
'type' => 'suggest',
'tx_myext_domain_model_genre' => [
'maxItemsInResultList' => 25,
],
'default' => [
'searchWholePhrase' => 1
]
],
],
],
],
我承认我是从组字段(工作所在的地方)获得了提示向导的代码的。但是我需要在后端并排查看,而不是组视图。
我现在得到的是
但是我想要一个搜索框。 在哪里可以找到示例代码?
答案 0 :(得分:0)
原来我想要的根本不是向导!
但是所谓的MultiSelectFilterTextfield
只需在配置中添加'enableMultiSelectFilterTextfield' => true,
就可以了,所以
'genres' => [
'exclude' => false,
'label' => 'Genres',
'config' => [
'type' => 'select',
'renderType' => 'selectMultipleSideBySide',
'foreign_table' => 'tx_myext_domain_model_genre',
'MM' => 'tx_myext_project_genre_mm',
'size' => 10,
'autoSizeMax' => 30,
'maxitems' => 9999,
'multiple' => 0,
'enableMultiSelectFilterTextfield' => true, // <---- HERE
'wizards' => [
'_PADDING' => 1,
'_VERTICAL' => 1,
'edit' => [
'module' => [
'name' => 'wizard_edit',
],
'type' => 'popup',
'title' => 'Edit',
'icon' => 'EXT:backend/Resources/Public/Images/FormFieldWizard/wizard_edit.gif',
'popup_onlyOpenIfSelected' => 1,
'JSopenParams' => 'height=350,width=580,status=0,menubar=0,scrollbars=1',
],
'add' => [
'module' => [
'name' => 'wizard_add',
],
'type' => 'script',
'title' => 'Create new',
'icon' => 'EXT:backend/Resources/Public/Images/FormFieldWizard/wizard_add.gif',
'params' => [
'table' => 'tx_myext_domain_model_genre',
'pid' => '###CURRENT_PID###',
'setValue' => 'prepend'
],
],
],
],
],
会产生