[TYPO3-dev] FlexForm Help

Osipov Dan dosipov at phillyburbs.com
Fri Feb 15 21:54:04 CET 2008


I have a simple flexform with two fields. The first one is dynamic, and is populated by an external function. Upon change the form is reloaded. The second should pull records from a DB based on the value of the first field. How do I achieve that?
 
Here is a clipping from the XML code defining the structure:
        <dynField1>
          <TCEforms>
           <label>Widget Type</label>
           <config>
            <type>select</type>
            <items type="array">
                <numIndex index="0" type="array">
                    <numIndex index="0">Select One Bellow</numIndex>
                    <numIndex index="1">0</numIndex>
                </numIndex>
            </items>
             <itemsProcFunc>tx_pbwidgetlibrary_addFieldsToFlexForm->listWidgets</itemsProcFunc>
           </config>
           <onChange>reload</onChange> 
           </TCEforms>
        </dynField1> 
        <dynField2>
          <TCEforms>
           <label>Saved settings</label>
           <config>
            <type>select</type>
            <items>
                <numIndex index="0">
                    <numIndex index="0"></numIndex>
                    <numIndex index="1">0</numIndex>
                </numIndex>
            </items>
            <foreign_table>tx_pbwidgetlibrary_mm</foreign_table>
            <foreign_table_where>
                AND widget=###VALUE_FROM_FIRST_FIELD###
            </foreign_table_where>
           </config>
           </TCEforms>
        </dynField2>
 
Thanks!
Dan




More information about the TYPO3-dev mailing list