[Flow] [SOLVED] form with items that do not represent members of an object

Axel Wüstemann awu at qbus.de
Tue Oct 8 18:13:17 CEST 2013


Due to

http://docs.typo3.org/flow/TYPO3FlowDocumentation/stable/TheDefinitiveGuide/PartIII/ModelViewController.html#internal-arguments

one can create a field like

<f:form.textfield name="__newItem" />

and then in the controllers createAction

if ($this->request->getInternalArgument('__newItem') !== '') {
   $newObject->setItem($this->request->getInternalArgument('__newItem'));
}

Nice ;=)

Axel


Am 08.10.2013 13:27, schrieb mario chiari:
> Alex
>
> in a similar situation, I just gave the user the possibility to create
> the new object foo4. If the create action redirect him to the main form,
> the selectbox will display the new value too.
>
> cheers
> mario
>
>
>
> On Tue, 2013-10-08 at 12:59 +0200, Axel Wüstemann wrote:
>> Hello,
>>
>> as I could understand up to now, forms rely on model objects, so all
>> formfields need to represent an object member.
>>
>> Now I have the case, that I want to select an item from a selectbox, but
>> alternatively set a new item of that type.
>>
>> Example:
>> In my selectbox "bar" I can choose between foo1, foo2 or foo3, but now I
>> want to introduce a foo4 value - so additional to the selectbox "bar" I
>> want to have a text filed "newBar" where I can enter the value foo4.
>>
>> Maybe I can introduce a "newBar" menmber in my domain object, but than I
>> would need to exclude it from being persisted.
>>
>> How I can achieve that?
>>
>> Thanks
>>
>> Axel
>> _______________________________________________
>> Flow mailing list
>> Flow at lists.typo3.org
>> http://lists.typo3.org/cgi-bin/mailman/listinfo/flow
>
>
> _______________________________________________
> Flow mailing list
> Flow at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/flow
>


-- 
Qbus Werbeagentur GmbH

18055 Rostock, Heiligengeisthof 5
Tel:   0381 4 61 39 - 10 | Fax: - 22
21029 Hamburg, Chrysanderstraße 69A
Tel:   040 60 94 59 75
Mobil: 0179 46 455 46

www.xing.com/profile/Axel_Wuestemann
www.issuu.com/QbusAgentur/docs/qbus-referenzen?mode=embed

Handelsregister: HRB 11218 beim Amtsgericht Rostock Sitz der
Gesellschaft: Hansestadt Rostock
Geschäftsführer: Dipl.-Ing. Axel Wüstemann

www.qbus.de | www.qbus.de/qblog
www.facebook.com/QbusAgentur


More information about the Flow mailing list