[TYPO3-templavoila] Remove mapped attribute if empty

Rudy Gnodde (WIND Internet) rgn at windinternet.nl
Wed Aug 19 16:31:33 CEST 2009


I've mapped the "checked" attribute of an input (type="checkbox"). In 
the XML I've set the field to a type check and use TypoScript to fill it 
if checked. This works fine, except that if the field isn't checked I 
get <input type="text" checked=""... which isn't valid and the resulting 
checkbox is checked.

So my question is: Is there any way to remove a mapped attribute if the 
value is empty?

The XML of the field is:

<field_checked type="array">
	<tx_templavoila type="array">
		<sample_data type="array">
			<numIndex index="0"></numIndex>
			10 = CASE
			10.key.current = 1
			10.stdWrap.required = 1
			10.1 = TEXT
			10.1.value = checked
	<TCEforms type="array">
		<config type="array">
			<default type="integer">0</default>



More information about the TYPO3-project-templavoila mailing list