[TYPO3-dev] Flexform array - add/remove element

Benoit Chenu bchenu at gaya.fr
Fri May 10 11:59:35 CEST 2013


Hi Sascha,

You can create a dynamical Flexform which will allow you to add unlimited
buttons like this :

<T3DataStructure>
        <meta>
                <langDisable>1</langDisable>
        </meta>
        <sheets>
                <content>
                        <ROOT>
                                <TCEforms>
                                        <sheetTitle>Content</sheetTitle>
                                </TCEforms>
                                <type>array</type>
                                <el>
                                        <settings.buttons>
<section>1</section>
 <type>array</type>
<el>
<record>
 <type>array</type>
<tx_blockcontent>
<title>Add a button</title>
 </tx_blockcontent>
<el>
<button>
 <TCEforms>
<label>Button</label>
<config>
 <type>check</type>
</config>
</TCEforms>
 </button>
</el>
</record>
 </el>
</settings.buttons>
                                </el>
                        </ROOT>
                </content>
        </sheets>
</T3DataStructure>


Benoit



2013/5/8 Sascha <lsascha at gmail.com>

> Hello everyone,
>
> i am currently trying to create a bit of a more complex flexform.
>
> <T3DataStructure>
>         <meta>
>                 <langDisable>1</langDisable>
>         </meta>
>         <sheets>
>                 <content>
>                         <ROOT>
>                                 <TCEforms>
>                                         <sheetTitle>Content</sheetTitle>
>                                 </TCEforms>
>                                 <type>array</type>
>                                 <el>
>                                         <settings.buttons.0>
>                                         ...
>                                         <settings.buttons.0>
>                                         <settings.buttons.1>
>                                         ...
>                                         <settings.buttons.1>
>                                 </el>
>                         </ROOT>
>                 </content>
>         </sheets>
> </T3DataStructure>
>
> so i get the following output:
> [img]index.php/fa/15722/0/[/img]
>
> i noticed the trashcan button where i can delete a element.
> Of course the deleting is ignored since the elements are hardcoded in the
> XML.
>
>
> Now my Questions:
>
> Is it possible to make it more dynamic so that i can add and remove as
> many buttons as i want?
>
> If it is not possible, can i at least remove that trashcan icon so the
> user can't click on it accidently?
>
> I found nothing for that in the documentation.
>
>
> Thanks in advance for any answer.
>
> _______________________________________________
> TYPO3-dev mailing list
> TYPO3-dev at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-dev
>



-- 

Benoît Chenu, bchenu at gaya.fr
*GAYA - La Nouvelle Agence* - http://www.gaya.fr
12 bd de Sébastopol, 75004 Paris
Tel : 01 43 410 410 / Fax: 01 43 410 310
Facebook : Agence GAYA <http://www.facebook.com/Agence.GAYA>
ICQ#: 232217899



More information about the TYPO3-dev mailing list