[TYPO3] flexform wizard (edit, add) problem ...

Dr. Ronald P. Steiner Ronald.Steiner at googlemail.com
Tue Sep 9 20:20:24 CEST 2008


Hi Kay,

"field_elements" is a field where you can create records (add.gif).
This flex-form code is from a FCE so you might need to adapt some small
things for your needs.

hope that helps

Ron

P.S.: Here the code:

<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<T3DataStructure>
     <meta type="array">
         <langDisable>1</langDisable>
     </meta>
     <ROOT type="array">
         <tx_templavoila type="array">
             <title>ROOT</title>
             <description>Select the HTML element on the page which you 
want to be
the overall container element for the template.</description>
         </tx_templavoila>
         <type>array</type>
         <el type="array">
................
             <field_elements type="array">
                 <tx_templavoila type="array">
                     <title>elements</title>
                     <sample_data type="array">
                         <numIndex index="0"></numIndex>
                     </sample_data>
                     <eType>ce</eType>
                     <TypoScript>
     10= RECORDS
     10.source.current=1
     10.tables = tt_content
                     </TypoScript>
                     <oldStyleColumnNumber 
type="integer">0</oldStyleColumnNumber>
                 </tx_templavoila>
                 <TCEforms type="array">
                     <config type="array">
                         <type>group</type>
                         <internal_type>db</internal_type>
                         <allowed>tt_content</allowed>
                         <size>5</size>
                         <maxitems>200</maxitems>
                         <minitems>0</minitems>
                         <multiple>1</multiple>
                         <show_thumbs>1</show_thumbs>
                     </config>
                     <label>elements</label>
                 </TCEforms>
             </field_elements>
............
         </el>
     </ROOT>
</T3DataStructure>

Kay Strobach schrieb:


Kay Strobach schrieb:
> hello list,
> 
> i created an extension with an flexform, and have a problem with the add 
> wizard.
> 
> In some hours of searching i found out, that flexforms use nearly the 
> same configuration options like other fields via tca (no irre, as i 
> understand)
> 
> So i created a flexform with a field to select a record from the current 
> page. To increase the usability I added a wizard, to create a new record.
> The created record is not selected in the flexform, after saving and 
> closing the created record (Point 3 in the list below).
> 
> I also tried to set <setValue>set</setValue>, but this doesn't work as 
> well.
> like described on 
> http://typo3.org/documentation/document-library/core-documentation/doc_core_api/4.1.0/view/4/3/#id4284746 
> 
> 
> Do you have any suggestions how to make the following scenario possible:
>     1. create content record
>     2. hit the plus(add.gif) in the flexform, create new record of type 
> tx_pbsurvey_item
>     3. After saving and closing the record from point 2 select the 
> created record in the list ...
> 
> 
> Many Thanks
> Regards Kay
> 
> Versioninfo:
>     Typo3 4.2.1
>     PHP 5+
> 
> 
> Part of the flexform
> ...
>     <selectedquestion>
>       <TCEforms>
>          <label>selected Question</label>
>          <config>
>            <type>select</type>
>            <size>1</size>
>            <minitems>0</minitems>
>            <maxitems>1</maxitems>
>            <foreign_table>tx_pbsurvey_item</foreign_table>
>            <foreign_table_where>
>              AND tx_pbsurvey_item.pid = ###CURRENT_PID### ORDER BY 
> tx_pbsurvey_item.sorting
>            </foreign_table_where>
>            <selicon_cols>6</selicon_cols>
>            <items>
>              <numIndex index="0">
>                <numIndex index="0">«»«» no Question selected 
> «»«»</numIndex>
>                 <numIndex index="1">0</numIndex>
>                  </numIndex>
>                </items>
>                <wizards>
>                  <add>
>                    <type>script</type>
>                    <title>Create new Record</title>
>                    <icon>add.gif</icon>
>                    <params>
>                      <table>tx_pbsurvey_item</table>
>                      <pid>###CURRENT_PID###</pid>
>                      <setValue>prepend</setValue>
>                    </params>
>                    <script>wizard_add.php</script>
>                  </add>
>                  <edit>
>                    ...
>                  </edit>
>                  <list>
>                    ...
>                  </list>
>                </wizards>
>          </config>
>        </TCEforms>
>      </selectedquestion>
> ...


More information about the TYPO3-english mailing list