cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Reinhard Poetz <reinh...@apache.org>
Subject Re: forms newbie
Date Thu, 16 Dec 2004 13:48:17 GMT
Ben Anderson wrote:
> 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");

         form.lookupWidget("documentName").value = "value";

> 	var data = new Object();
> 	data.documentName = {value:"hello"};
> 	var k = form.showForm("index-display", data);

         var k = form.showForm("index-display");

-- 
Reinhard

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


Mime
View raw message