[TYPO3-mvc] Multiple Checkboxes for an object in a form
Christian Zenker
christian.zenker at 599media.de
Tue Nov 9 14:27:52 CET 2010
On Tue, 09 Nov 2010 12:53:20 +0100, Franz Koch
<typo3.RemoveForMessage at elements-net.de> wrote:
Hi Franz.
Thanks for your ideas.
> Just curious - will it be released in TER?
Actually I don't really want to support the extension. To be helpfull to
more people it should be more configurable (preset values through
TypoScript, etc). But I could upload it as an example and if anyone is
eager to build upon it this would be highly appreciated.
> Of which type is your categories property?
It is an object storage but I use the "getMailCategoriesAsArray()" and
method in the domain model to return a key-value array (i.e. the uid is
the key, the title the value). The "setMailCategoriesAsArray()" takes an
array of ids and (un-)links modified objects.
Usually this should work.(?) The unexpected behavior occurs in the form
validation with a messed up HMAC.
> Have you tried that approach by binding the checkbox to the property
> instead?
Yep. But I don't see how this should work. The only values shown are those
that are already linked to the specific instance of the address. I could
preselect all categories, but that is not really what I want. Additionally
it would not be possible to subscribe to additional categories later on.
Btw. I'm working with Fluid 1.2.0 and Exbase 1.2.0 - the versions shipped
with TYPO3 4.4. I would have tried SVN trunk, but the mailing list states
it was broken at this time.
> Of course. Just yesterday I created a form where visitors can order
> brochures and the selection is done via checkboxes (my custom
> checkboxViewHelper allowing objectStorages though). For me your code is
> working just fine, the only difference I have is that I bound the
> checkbox to the property.
I guess you did that by preselecting all brochures..? I imagine this
should work, but it seems brochures (or categories in my case) not
assigned to the object can't be selected. This way the user is actually
just capable of *un-*selecting items. Or am I seeing this wrong?
Christian.
More information about the TYPO3-project-typo3v4mvc
mailing list