Skip to content

Instantly share code, notes, and snippets.

@Plou
Created June 13, 2013 13:53
Show Gist options
  • Save Plou/5773841 to your computer and use it in GitHub Desktop.
Save Plou/5773841 to your computer and use it in GitHub Desktop.
Example of a flexform with text, rich text editor (rte), file (image), date and multiple items (flexform sections)
<dateName>
<TCEforms>
<label>LLL:EXT:skinFlex/flex/locallang.xml:flexform.flex.dateName</label>
<config>
<type>input</type>
<eval>date</eval>
</config>
</TCEforms>
</dateName>
<fileName>
<TCEforms>
<label>LLL:EXT:skinFlex/flex/locallang.xml:flexform.flex.fileName</label>
<config>
<type>group</type>
<internal_type>file</internal_type>
<allowed>gif,jpg,jpeg,tif,bmp,pcx,tga,png,pdf,ai</allowed>
<max_size>5000</max_size>
<uploadfolder>uploads/skinFlex/flex</uploadfolder>
<maxitems>1</maxitems>
<size>1</size>
<selectedListStyle>width:200px</selectedListStyle>
<show_thumbs>1</show_thumbs>
</config>
</TCEforms>
</fileName>
<T3DataStructure>
<meta>
<langDisable>1</langDisable>
</meta>
<sheets>
<sDEF>
<ROOT>
<TCEforms>
<sheetTitle>LLL:EXT:skinFlex/flex/locallang.xml:flexform.flex.sheets.general</sheetTitle>
</TCEforms>
<type>array</type>
<el>
<!--
insert elements here
-->
</el>
</ROOT>
</sDEF>
</sheets>
</T3DataStructure>
<inputName>
<TCEforms>
<label>LLL:EXT:skinFlex/flex/locallang.xml:flexform.flex.inputNmae</label>
<config>
<type>input</type>
</config>
</TCEforms>
</inputName>
<rteName>
<TCEforms>
<label>LLL:EXT:skinFlex/flex/locallang.xml:flexform.flex.rteName</label>
<config>
<type>text</type>
<cols>30</cols>
<rows>5</rows>
</config>
<defaultExtras>richtext[*]:rte_transform[mode=ts_css]</defaultExtras>
</TCEforms>
</rteName>
<!-- a typoscript configuration need to be added on thee field: parseFunc - https://gist.github.com/in8/5765989 -->
<items>
<section>1</section>
<type>array</type>
<el>
<item>
<type>array</type>
<tx_templavoila>
<title>LLL:EXT:skinFlex/flex/locallang.xml:flexform.flex.item</title>
</tx_templavoila>
<el>
<!--
insert elements here
-->
</el>
</item>
</el>
</items>
<textareaName>
<TCEforms>
<label>LLL:EXT:skinFlex/flex/locallang.xml:flexform.flex.textareaName</label>
<config>
<type>text</type>
</config>
</TCEforms>
</textareaName>
@stafast
Copy link

stafast commented Sep 13, 2018

New variant for RTE:

<!-- Text -->
<settings.bodytext>
<TCEforms>
<label>Text</label>
<config>
<type>text</type>
<enableRichtext>1</enableRichtext>
</config>
</TCEforms>
</settings.bodytext>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment