cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben Anderson <benanderson...@gmail.com>
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"/>
		</fd:field>

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.

Thanks,
Ben

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


Mime
View raw message