If you are working with extbase extension development and you're in such a need that you want to provide customization options available from backend only then you can do it using flex form.
In the flex form you can provide many typos of input options as per your need. Like input text, textarea, rich content, likes etc.
For setting flex form you need to do below configuration in your extension.
$extensionName = t3lib_div::underscoredToUpperCamelCase($_EXTKEY);
$pluginSignature = strtolower($extensionName) . '_pluginnameinsmalllatters';
(In place of above red highlighted text, you have to put your name of plugin in small latters. )
$GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist'][$pluginSignature] = 'pi_flexform';
t3lib_extMgm::addPiFlexFormValue($pluginSignature, 'FILE:EXT:' . $_EXTKEY . '/Configuration/FlexForms/flexform.xml');
(Configuration/FlexForms/flexform.xml is the path to your flex form xml.)
Now, you have to create a folder FlexForms in Configuration folder. Then you have to create flexfom.xml file in FlexForms folder.
For sample flex form, you can use below code :
Now, you have to clear typo3temp folder (You can use the easy script cleartemp) and clear cache from backend.
You will have a link option in your backend once you use above flex form.
You can get the selected values in flex form by using below code :
$this->settings['pageid']
You can also use other flex form fields. Find more on below link :
http://typo3techie.blogspot.in/search/label/FlexForm
Thanks for reading the post. If you like this post then share with your friends. ENJOY !! :)
In the flex form you can provide many typos of input options as per your need. Like input text, textarea, rich content, likes etc.
For setting flex form you need to do below configuration in your extension.
$extensionName = t3lib_div::underscoredToUpperCamelCase($_EXTKEY);
$pluginSignature = strtolower($extensionName) . '_pluginnameinsmalllatters';
(In place of above red highlighted text, you have to put your name of plugin in small latters. )
$GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist'][$pluginSignature] = 'pi_flexform';
t3lib_extMgm::addPiFlexFormValue($pluginSignature, 'FILE:EXT:' . $_EXTKEY . '/Configuration/FlexForms/flexform.xml');
(Configuration/FlexForms/flexform.xml is the path to your flex form xml.)
Now, you have to create a folder FlexForms in Configuration folder. Then you have to create flexfom.xml file in FlexForms folder.
For sample flex form, you can use below code :
<t3datastructure> <langdisable>1</langdisable> <sheets> <sdef> <root> <tceforms> <sheettitle>General Settings</sheettitle> </tceforms> <type>array</type> <el> <settings .pageid=""> <tceforms> <exclude>1</exclude> <label>Login page</label> <config> <type>group</type> <internal_type>db</internal_type> <allowed>pages</allowed> <size>1</size> <maxitems>1</maxitems> <minitems>0</minitems> <show_thumbs>1</show_thumbs> </config> </tceforms> </settings> </el> </root> </sdef> </sheets> </t3datastructure>
Now, you have to clear typo3temp folder (You can use the easy script cleartemp) and clear cache from backend.
You will have a link option in your backend once you use above flex form.
You can get the selected values in flex form by using below code :
$this->settings['pageid']
You can also use other flex form fields. Find more on below link :
http://typo3techie.blogspot.in/search/label/FlexForm
Thanks for reading the post. If you like this post then share with your friends. ENJOY !! :)