Hi,
In your .vm file:
## This is on one line..
#set($editComputer = \
$intake.get('EditComputerInfoGroup').mapTo($mytool.getComputer($data)))
## The above sets $editComputer to be mapped to a data object returned
## from calling $mytool.getComputer($data) which has fields like
## Description, MacAddress, etc. with the fields set (from db call or
## whatever).
## Then you have this in your form:
<input type="text" name="$editComputer.Description.Key" size="20"
value="$editComputer.Description" maxlength="10">
## And voila, it'll have the pre-populated data!
Regards,
Daniel
On Sun, 1 Feb 2004, Oron Ogdan Adam wrote:
> Hi bill
>
> you can set the default value in intake.xml file with the DefaultValue
> property of the field tag,
> the other option is in the template
>
> $group = $intakeTool.SomeGroup.Default
> $group.SomeField.setDefaultValue("some default value")
>
> Oron
>
> http://netada.co.uk
>
>
>
> -----Original Message-----
> From: Bill Mulert [mailto:[EMAIL PROTECTED]
> Sent: Sunday, February 01, 2004 9:20 PM
> To: [EMAIL PROTECTED]
> Subject: Can I use Intake on a form with default values?
>
>
> I'm successfully using Intake on forms that are initially empty. Now I
> want to use it on a form that has default values. I don't see a way to
> prepopulate the default value of a Field because Field.setDefaultValue()
> is protected and unaccessable to me.
>
> What am I missing?
>
> regards --
> -- bill
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]