[FLOW3-general] fluid - Create input fields from array
David Sporer
david.sporer at googlemail.com
Sun Aug 5 19:02:49 CEST 2012
Hey guys,
don't know if there's an example on the web but I haven't found one.
I have an object that contains an array.
I need to create a textfield in a form for every item in the array. The
value of the original array should be the key in the new array and the value
of the textfield should be the value in the new array.
My first approach looks like this but I know it can't work.
Could you help me out?
<f:for each="{pass.keysToReplace}" as="replaceableKey">
<label for="newPassInstance.user.userData">
{replaceableKey.name}
</label>
<br>
<f:form.textbox property="newPassInstance.user.userData"
id="newPassInstance.user.userData" />
<br>
</f:for>
Pass is the object that contains the keysToReplace array. In this array are
replaceableKey objects that have a name property.
newPassInstance is the object I want to create and user is a connected
entity that has the userData array in it.
My questions are now:
1. Is this possible? What other ways to do this are there?
2. How to do it? I can't even access the replacableKey.name - it
simply shows nothing. But the keysToReplace array is there. It generates me
two input fields on the created form.
Thank you very much!
David
More information about the FLOW3-general
mailing list