[TYPO3-mvc] Fluid: form.select view helper and empty default item

my.maylz at web.de my.maylz at web.de
Tue Apr 20 10:02:00 CEST 2010


well, this seems to be the same ? :)

I had to user the "old fashioned way" -
snip

		$data = array(''=>'-- Please select --');
		while( $row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res) )
		{	
			$data[$row['uid']] = $row['someval'];
		}
		
		return $data;

snap

David

Am 20.04.2010 09:44, schrieb Henrik Møller Rasmussen:
> On 20/04/10 09.16, my.maylz at web.de wrote:
>> Hi,
>>
>> i've had a similar Problem - when merging the resulting array of the the
>> "findAll" in the repos with the empty option the resulting array was
>> reindexed so that the category objects didn't have the right uids
>> anymore...
>>
>> i solved this by putting the empty option inside the repos function
>>
>
> Hmm - still no luck.
>
> The repo now has this method:
>
> public function findAllWithEmptyCabinet() {
> return array_merge(array(0=>'---'),$this->findAll());
> }
>
> It renders the select box correct with the --- option, but it will not
> save it when submitting with the --- chosen. It saves with all the other
> options :-(
>
> - Henrik
> _______________________________________________
> TYPO3-project-typo3v4mvc mailing list
> TYPO3-project-typo3v4mvc at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-typo3v4mvc
>


More information about the TYPO3-project-typo3v4mvc mailing list