You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by "Ulrich, Dominik" <Do...@ids.de> on 2004/02/03 09:42:04 UTC

[woody] access formdata from flowscript

Hi
I had a look at the woody binding example, and its very nice!
but how can I access the data, the user enters in the form?
I want to do this, to save the form, to an unique filename,
i.e. there is:

function makeTargetURI(path) {
    var sfx = ".xml";
    var newSfx = "-result.xml";   <--- I want to create a filename here, which has 
							the user name, and a date he entered.
    var newPath = cocoon.parameters["newPath"];
    if (path.match(/^.*\.xml$/)) {
        newPath = path.substring(0, path.length - ".xml".length);
    }
    return newPath + newSfx;
}

How can I override the original name? How to access the document tree?

Any ideas would be very helpful since I found no hint on the wiki.

Regards Dominik

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: [woody] access formdata from flowscript

Posted by Joerg Heinicke <jo...@gmx.de>.
Maybe you are searching for something like form.getWidget('widgetid').value
(written from head)

Just use it after showForm() to access the value, pass them to your 
makeTargetURI() function.

Joerg

On 03.02.2004 09:42, Ulrich, Dominik wrote:

> Hi
> I had a look at the woody binding example, and its very nice!
> but how can I access the data, the user enters in the form?
> I want to do this, to save the form, to an unique filename,
> i.e. there is:
> 
> function makeTargetURI(path) {
>     var sfx = ".xml";
>     var newSfx = "-result.xml";   <--- I want to create a filename here, which has 
> 							the user name, and a date he entered.
>     var newPath = cocoon.parameters["newPath"];
>     if (path.match(/^.*\.xml$/)) {
>         newPath = path.substring(0, path.length - ".xml".length);
>     }
>     return newPath + newSfx;
> }
> 
> How can I override the original name? How to access the document tree?
> 
> Any ideas would be very helpful since I found no hint on the wiki.
> 
> Regards Dominik

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org