how could i can add html content element in flexform in typo3.
I have tried
<settings.sDEF1.sociallinks>
<TCEforms>
<exclude>1</exclude>
<label>Social Links</label>
<config>
<type>text</type>
<renderType>t3editor</renderType>
<format>html</format>
<cols>30</cols>
<rows>5</rows>
</config>
</TCEforms>
</settings.sDEF1.sociallinks>
which not working.
ref : https://docs.typo3.org/typo3cms/TCAReference/Reference/Columns/Text/Index.html#rendertype
<options.richTextArea>
<TCEforms>
<exclude>1</exclude>
<label>
Rich Text Area
</label>
<config>
<type>text</type>
<rows>5</rows>
<cols>300</cols>
<enableRichtext>true</enableRichtext>
</config>
<defaultExtras>richtext[]</defaultExtras>
</TCEforms>
</options.richTextArea>
Related
With TCEFORM in Page TS, you can remove a FlexForm field from an extension plugin, e.g. from EXT:news:
TCEFORM.tt_content.pi_flexform.news_pi1.additional.settings\.detailPid.disabled = 1
The example above is working, but how can I remove a field from a gridelements FlexForm?
This is not working:
TCEFORM.tt_content.pi_flexform.gridelements_pi1.mySheet.myField.disabled = 1
More detailled:
I use EXT:bootstrap_grids, which provides FlexForm "flexform_2col.xml". From this FlexForm, I want to disable tab "largeDevices" with fields "lgCol1" and "lgCol2":
<T3DataStructure>
<sheets>
[...]
<largeDevices>
<ROOT type="array">
<TCEforms>
<sheetTitle>LLL:EXT:bootstrap_grids/Resources/Private/Language/locallang_db.xlf:grid.sheet.largeDevices</sheetTitle>
</TCEforms>
<type>array</type>
<el type="array">
<lgCol1 type="array">
<TCEforms type="array">
<label>LLL:EXT:bootstrap_grids/Resources/Private/Language/locallang_db.xlf:grid.label.col1</label>
<config type="array">
<type>select</type>
<renderType>selectSingle</renderType>
<itemsProcFunc>Laxap\BootstrapGrids\Controller\FlexFormController->getTwoColumnOptions</itemsProcFunc>
</config>
</TCEforms>
</lgCol1>
<lgCol2 type="array">
<TCEforms type="array">
<label>LLL:EXT:bootstrap_grids/Resources/Private/Language/locallang_db.xlf:grid.label.col2</label>
<config type="array">
<type>select</type>
<renderType>selectSingle</renderType>
<itemsProcFunc>Laxap\BootstrapGrids\Controller\FlexFormController->getTwoColumnOptions</itemsProcFunc>
</config>
</TCEforms>
</lgCol2>
</el>
</ROOT>
</largeDevices>
But it seems, EXT:gridelements handles the FlexForm in some other way so it can't be manipulated with TCEFORM, this is not working:
TCEFORM.tt_content.pi_flexform.gridelements_pi1.largeDevices.lgCol1.disabled = 1
The key "gridelements_pi1" is wrong. It can be either "default", effecting all gridelement layout types or a specific type you defined.
So this would work for the excample from the question:
TCEFORM.tt_content.pi_flexform.default.largeDevices.lgCol1.disabled = 1
I'm building an extension and I have a field of type flex. I have an array with extracted records from a TS config that I like to use as prefilled values for a field, which I also want to be editable in the TYPO3 admin. So I want them to be shown as textarea, however I don't know how to use the array in the flex items configuration.
'<T3DataStructure>
<meta>
<langDisable>1</langDisable>
</meta>
<sheets>
<sDEF>
<ROOT>
<TCEforms>
<sheetTitle>Title</sheetTitle>
</TCEforms>
<type>array</type>
<el>
<pageSelector>
<TCEforms>
<label>Something</label>
<config>
<type>text</type>
<items type="array">
<numIndex index="0" type="array">
<numIndex index="0">'.$php_variable_array.'</numIndex>
<numIndex index="1">0</numIndex>
</numIndex>
</items>
<minitems>0</minitems>
<maxitems>1</maxitems>
</config>
</TCEforms>
</pageSelector>
</el>
</ROOT>
</sDEF>
</sheets>
</T3DataStructure>'
What is the best way to render link field in TYPO3 fluid template?
Link field is defined via flexform as:
<field_link type="array">
<TCEforms type="array">
<config type="array">
<type>input</type>
<eval>trim</eval>
<wizards type="array">
<link type="array">
<type>popup</type>
<title>Link</title>
<icon>link_popup.gif</icon>
<script>
browse_links.php ? mode = wizard & amp;
act = page
</script>
<params type="array">
<blindLinkOptions>file,spec,email,folder</blindLinkOptions>
</params>
<JSopenParams>height=300,width=500,status=0,menubar=0,scrollbars=1</JSopenParams>
</link>
</wizards>
</config>
<label>link</label>
</TCEforms>
</field_link>
Fluid comes with viewhelpers such as link.email, link.external, link.page but my link field could be either page id or external link or email or link to sys_file record. How do you handle that in your projects without making multiple if statemens in fluid template? (custom viewhelper?, typoscript object)?
You can also use the f:link.page to generate links external urls or files, that does not matter as internally typolink is used.
If you are using the wizards like in your example, you should use the f:link.typolink viewhelper which supports all attributes.
Link for email works perfect
here my flexform:
<settings.link>
<TCEforms>
<label>Link</label>
<config>
<type>input</type>
<size>30</size>
<eval>trim</eval>
<softref>typolink,typolink_tag,images,url</softref>
<wizards>
<_PADDING>2</_PADDING>
<link>
<type>popup</type>
<title>Link</title>
<module>
<name>wizard_element_browser</name>
<urlParameters>
<mode>wizard</mode>
</urlParameters>
</module>
<icon>link_popup.gif</icon>
<script>browse_links.php?mode=wizard</script>
<params>
<blindLinkOptions>file,folder,url,spec</blindLinkOptions>
</params>
<JSopenParams>height=500,width=500,status=0,menubar=0,scrollbars=1</JSopenParams>
</link>
</wizards>
</config>
</TCEforms>
</settings.link>
Output:
Liunk
I need to create a flexform field where the user is able to select a tt_content element - but I want to limit that to only tt_content elements from a certain page. What I have so far:
<settings.test>
<TCEforms>
<label>test</label>
<config>
<type>group</type>
<internal_type>db</internal_type>
<allowed>tt_content</allowed>
<size>1</size>
<maxitems>1</maxitems>
<minitems>0</minitems>
<show_thumbs>1</show_thumbs>
</config>
</TCEforms>
</settings.test>
is there a way to limit it to a specific page? The typo3 Version is 7.6.10.
Thank you in advance.
The <type>group</type> is used for a browselike behavior and i can not see how you can add a filter there. Since you want to show a limited number of elements, you can use <type>select</type> with foreign_table_where
<config>
<type>select</type>
<renderType>selectSingle</renderType>
<foreign_table>tt_content</foreign_table>
<foreign_table_where>AND tt_content.pid = ###PAGE_TSCONFIG_ID###</foreign_table_where>
<size>1</size>
<items>
<numindex index="0">
<numindex index="0">--</numindex>
<numindex index="1"></numindex>
</numindex>
</items>
<maxitems>1</maxitems>
<minitems>0</minitems>
</config>
Then you need to set the id in your Page Config
TCEFORM.tt_content.pi_flexform.PAGE_TSCONFIG_ID = 123
I work on an extension and for a plugin I want to select specific records. For that I created a flexform with a TCA select configuration:
<T3DataStructure>
<meta>
<langDisable>1</langDisable>
</meta>
<sheets>
<sDEF>
<ROOT>
<TCEforms>
<sheetTitle>TEST</sheetTitle>
</TCEforms>
<type>array</type>
<el>
<settings.selection>
<TCEforms>
<exclude>1</exclude>
<label>Selection</label>
<config>
<type>select</type>
<foreign_table>tx_mycollection_domain_model_mycollection</foreign_table>
<renderType>selectCheckBox</renderType>
<size>5</size>
<minItems>3</minItems>
<maxItems>999</maxItems>
<foreign_table_where>AND tx_mycollection_domain_model_mycollection.sys_language_uid=###REC_FIELD_sys_language_uid###</foreign_table_where>
</config>
</TCEforms>
</settings.selection>
</el>
</ROOT>
</sDEF>
</sheets>
</T3DataStructure>
It looks fine, in the backend I have checkboxes to select the records. But when I save the plugin only the first checkbox is checked/saved.
Is there something wrong in the configuration or what could be the reason that I can not save multible values?
<minItems>3</minItems>
<maxItems>999</maxItems>
From the documentation here:
https://docs.typo3.org/typo3cms/TCAReference/Reference/Columns/Select/Index.html#properties
These needs to be specified as all lower case, so changing them to:
<minitems>3</minitems>
<maxitems>999</maxitems>
Should resolve your issue. It is saving only 1 right now, since maxitems by default is set to 1.