[TYPO3-dev] [ Extase ] Save same content many times on property
Petit Bison
stillflaw at gmail.com
Tue Jun 14 14:24:46 CEST 2016
Hi everyone,
Here is my question / issue:
Functional : I would like to be able to select, in a list of different drawers, the drawers and their related quantities to add to a closet. In the end I'll get a quote with my custom closet filled by the different drawers I would have selected.
Technical : I have a (Fluid rendered) form in which the object is the closet. Inputs are mapped on properties of the closet using the "property" Fluid's possibility. So on of my form's input is "<f:form.select multiple='true' property='drawers' options='{drawers}' />.
The Closet's model contains a drawers property which is an m:n relation using a relation table in which references will be stored.
Everything works fine when I add ONE of each drawer and then submit the form, but what if I would like to save the same content many times ?
No matter what I try (using for example a JS onclick function to add an option entry to the select input : if the same content is added multiple times, only one is stored in DB).
So, as it's possible to add same contents many times in BE, when you set a select as multiple in TCA, I thought I could reproduce easily the same behavior, but in the end I didn't find a proper ay to do so.
So, before developing something ugly or non-standard, does anyone has an idea / advice on a the most proper and standard way of doing so ?
Thanks a lot,
Regards,
More information about the TYPO3-dev
mailing list