cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben Anderson <>
Subject forms newbie
Date Thu, 16 Dec 2004 13:21:23 GMT
I just want to set a field in a form before I display it.  I'm
assuming I can set a default value in the form definition, but I was
trying to set it explicity in my flow script.

simple form definition
		<fd:field id="documentName" required="true">
			<fd:label>Document Name:</fd:label>
			<fd:datatype base="string"/>

flow script
	var form = new Form("forms/index.xml");
	var data = new Object();
	data.documentName = {value:"hello"};
	var k = form.showForm("index-display", data);

Assuming I have all the other steps in place - should this work?  I'm
thinking I'm not doing the flow script correctly?  The label shows up,
but the value doesn't seem to be set.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message