I can use 2 groups just fine for different data but I want to apply
different rules from each group to
the same field effectively.
(this is a bit contrived but I hope you can see what I am trying to do.)
for example:
intake.xml
<group name="DuringEdit" key="ds">
<field name="Field1" key="f1" type="String">
<rule name="mask" value="[A-Z][0-9]*">Wrong
format</field>
</field>
</group>
<group name="CompletedEditing" key="ce">
<field name="Field1" key="f1" type="String">
<rule name="required" value="true">You must enter
something here.</rule>
<rule name="mask" value="[A-Z][0-9]*">Wrong
format</field>
</field>
</group>
In my velocity template for form
#set ($entryGroup = $intake.DuringSave.Default)
<input name="$entryGroup.Field1.Key" value="$!entryGroup.Field1.Value"
/>
In my confirm completed editing template
#set ($entryGroup = $intake.CompletedEditing.Default)
#if (! $entryGroup.isAllValid())
You haven't completed editing ..click here to fo back etc.
#end
this doesn't get the values although the field name are the same - since
the keys for the groups are different I think.
I guess I'm looking for a method to populate the CompletedEditing group
with the contents of the DuringEdit group easily
so I can validate against the new rules. To basically change the rules
at different stages of the application.
Does this make more sense?
thanks
Peter
> -----Original Message-----
> From: Scott Eade [mailto:[EMAIL PROTECTED]
> Sent: 26 November 2003 2:44
> To: Turbine Users List
> Subject: Re: Intake question (2 intake groups for one form)
>
>
> EXT-McTaggart, Peter wrote:
>
> >I would like to have two intake groups validate data on a form.
> >
> >The first one is applied while filling out the form (as user
> hit save).
> >This is not as stringent because they will be building up
> the data over
> >time. More to validate the formats as they save the data.
> >
> >The second group has a lot more required=true for when they complete
> >the form for submission, so that all data will be there
> before moving
> >on.
> >
> >Can anyone suggest a good way to achieve this?
> >
> >
> Have you tried it?
>
> As long as you declare both intake groups it should work fine.
>
> Scott
>
> --
> Scott Eade
> Backstage Technologies Pty. Ltd. http://www.backstagetech.com.au
>
>
>
>
>
> ---------------------------------------------------------------------
> 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]