[TYPO3-dev] Get value bits from checkbox array

Stefan Frömken firma at sfroemken.de
Tue Jun 15 07:48:03 CEST 2010


Oliver Klee schrieb:
> Hi,
> 
> Am 14.06.2010 11:48, schrieb Stefan Frömken:
>> In my extension I have 4 checkboxes in my flexform
>>
>> Checkbox1 value 1
>> Checkbox2 value 2
>> Checkbox3 value 3
>> Checkbox4 value 4
>>
>> In database I found a value of 8.
>>
>> OK...I know how the binary system works. So 8 meens that my checkbox4
>> was checked.
> 
> You could also change your flexforms to return a comma-separated list of
> keywords instead of a bitfield:
> 
> <singleViewPartsToDisplay>
> 	<TCEforms>
> 		<exclude>1</exclude>
> 	
> <label>LLL:EXT:realty/pi1/locallang.xml:realty.pi_flexform.singleViewPartsToDisplay</label>
> 		<config>
> 			<type>select</type>
> 			<items type="array">
> 				<numIndex index="0" type="array">
> 					<numIndex
> index="0">LLL:EXT:realty/pi1/locallang.xml:realty.pi_flexform.nextPreviousButtons</numIndex>
> 					<numIndex index="1">nextPreviousButtons</numIndex>
> 				</numIndex>
> 				<numIndex index="1" type="array">
> 					<numIndex
> index="0">LLL:EXT:realty/pi1/locallang.xml:realty.pi_flexform.heading</numIndex>
> 					<numIndex index="1">heading</numIndex>
> 				</numIndex>
> 				<numIndex index="2" type="array">
> 					<numIndex
> index="0">LLL:EXT:realty/pi1/locallang.xml:realty.pi_flexform.address</numIndex>
> 					<numIndex index="1">address</numIndex>
> 				</numIndex>
> 
> 
> Oli
You're right...that also works and I'm not limmited to 10 values as with 
checkboxes.




More information about the TYPO3-dev mailing list