[Typo3-dev] Default value for the radio button

Dmitry Dulepov typo3 at fm-world.ru
Sun Jan 16 20:01:42 CET 2005


Hi!

I am trying to make a TCEForm with radio buttons for the plugin 
configuration. "Typo3 Core API" says that TCEForm directly refect 
['columns'][fieldname]['config'] structure, so I made the following TCE 
form:
-------------------------
<T3DataStructure>
 <ROOT>
 <type>array</type>
 <el>
  <plugin_mode>
   <TCEforms>
    <label>Label:</label>
    <config>
     <type>radio</type>
     <items type="array">
      <numIndex index="0" type="array">
       <numIndex index="0">Radio 0</numIndex>
       <numIndex index="1">0</numIndex>
      </numIndex>
      <numIndex index="1" type="array">
       <numIndex index="0">Radio 1</numIndex>
       <numIndex index="1">1</numIndex>
      </numIndex>
      <numIndex index="2" type="array">
       <numIndex index="0">Radio 2</numIndex>
       <numIndex index="1">2</numIndex>
      </numIndex>
     </items>
     <default>2</default>
    </config>
   </TCEforms>
  </plugin_mode>
 </el>
 </ROOT>
</T3DataStructure>
-------------------------
I used "<default>2</default>" and expected that the last radio button will 
be selected. There is an example
in the section named "['columns'][fieldname]['config'] / type = radio" that 
sets the default value this way.

Unfortunately, it does not work: nothing selected in the form :( Am I doing 
something wrong or there is a bug in TCEForm processing?

BR,
Dmitry. 





More information about the TYPO3-dev mailing list