That would do the trick, I guess. The problem is I have a model-driven form, and that if I modify the model, the resulting form - and multi-valued fields - can change.
Though I can't hard-code the fields treatment in my flowscript.
I will probably have to generate the flow script with my model; and your javascript used as a template.
Many thanks for your help !
David
Patrick Greally a �crit :
I had this problem too....
In the flowscript - I have the following code.
//Code to get values out of a multivalue field (which is an array - not a string like the rest of them) // And the wierd code is so the last item doesn't have a comma after it. var multival = gst101b1.lookupWidget("topic").getValue(); var str = ""; for (var i = 0; i < multival.length - 1; i++){ str +=multival[i]+", "; } str +=multival[multival.length-1];
Not sur if that helps at all....
Cheers Patrick
[EMAIL PROTECTED] 6/01/2005 12:06:09 a.m. >>>
Hi all !
I use CForms with the 2.1.5 version of Cocoon. I use the binding framework to create an XML document with the values filled in the form.
Everything is perfect in the brave new world, except that the values filled ine the mutltivaluefield widgets don't stay in the final document if they are supposed to be transfered to an attribute. Only one of them (always the last one) can be found in the document. I expected that with it would create an attribute with several values seaprated by commas.
Did one of you meet this problem and - hopefully - find a solution ?
Regards,
David
-- ************************************ David Verdin GES / ENSAR - laboratoire d'informatique 65, rue de St Brieuc CS 84 215 35 042 Rennes cedex e-mail : [EMAIL PROTECTED] t�l : 02 23 48 54 58 fax : 02 23 48 54 50 ************************************
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
