I just got it to work !!!!
Put this on your velocity form  --->   
<input name="email[0]" value="" type="textfield"/>
<input name="email[1]" value="" type="textfield"/>
<input name="email[2]" value="" type="textfield"/>
<input name="email[3]" value="" type="textfield"/>
<input name="email[4]" value="" type="textfield"/>

Put this in the validator XML  ---->   

==============  VALIDATOR CODE =============================
                <parameter-validator name="email">
                        <args />
                        <validators>
                                <validator 
        
class="com.anite.antelope.validation.FormMaxLengthValidator">
                                        <args>
                                                <argument name="maxlength"
type="int" value="4" />
                                                <argument
name="inputTooLongMessage" type="string" 
                                                        value="This item
must be less than 4 characters in length. Please re-enter." 
                                                        />
                                        </args>
                                </validator>
                        </validators>
                </parameter-validator>
==============  END VALIDATOR CODE =============================

All the emails will be ran thru the FormMaxLengthValidator in this scenario
!!!

Hope this helps. 

Thanks,
Amit
 
-----Original Message-----
From: Ben Gidley [mailto:[EMAIL PROTECTED]
Sent: Friday, September 24, 2004 9:33 AM
To: Turbine Users List
Subject: Re: Intake - check dynamically generated forms


I can confirm Turbine review can handle this - it uses a syntax for field
names

<input name="field[0]" value="" type="textfield"/>
<input name="field[1]" value="" type="textfield"/>

Then when submitted validation for field will be run for both fields.

The ID value between the [] can be whatever you like.

In the action that will come though as 2 fields and there are helper
functions to extract the ID.

Ben


On Fri, 24 Sep 2004 09:15:06 -0400, Amit V Shah <[EMAIL PROTECTED]> wrote:
> Hi,
> 
> I dont know much about intake, but I wanted the same feature, and it
seemed
> intake couldn't handle it. So I tried "turbine-review" that ships with the
> antelope sample application. It seems that it can handle such situations.
I
> am working on the same feature. I will send email on the this thread if I
> can get it to work. In my opinion, intake is probably a little easier to
> use, but Turbine-Review seems much more flexible and lets you very easily
> write your own custom validators for front-end.
> 
> Cheers,
> Amit
> 
> -----Original Message-----
> From: Andreas Schwersenz [mailto:[EMAIL PROTECTED]
> Sent: Friday, September 24, 2004 5:47 AM
> To: 'Turbine Users List'; [EMAIL PROTECTED]
> Subject: AW: Intake - check dynamically generated forms
> 
> Hi,
> 
> thanks for your answer, but I still got a question.
> Ok, I can do something like this:
> 
> <field name="hola" multiValued="true" key="TemplateNameKey" type="String">
> ...
> </field>
> 
> And in my template:
> 
> ...
> <input name="$testgroup.hola.Key" value="$!testgroup.hola" size="25"
> type="text">
> <input name="$ testgroup.hola.Key" value="$!testgroup.hola" size="25"
> type="text">
> ...
> 
> But I need to match every one of these input fields with an id.
> Did you mean something like this:
> 
> ...
> <input name="$testgroup.hola.Key" value="$!testgroup.hola" size="25"
> type="text">
> <input name="$testgroup.hola.Key" value="id_1" size="25" type="hidden">
> <input name="$ testgroup.hola.Key" value="$!testgroup.hola" size="25"
> type="text">
> <input name="$testgroup.hola.Key" value="id_2" size="25" type="hidden">
> ...
> 
> But this is not a very nice way, I think, as it is not really matching the
> fields via some name.
> 
> Thy Andreas
> 
> > -----Urspr�ngliche Nachricht-----
> > Von: J�rgen Hoffmann [mailto:[EMAIL PROTECTED]
> > Gesendet: Freitag, 24. September 2004 09:12
> > An: Turbine Users List
> > Betreff: Re: Intake - check dynamically generated forms
> 
> 
> >
> > Hi,
> >
> > why not use one name for this field and make it multivalued? If this
> > number is one sort of database id then use a hidden field wit name id,
> > make this field multivalued, and then iterate over the corresponding
> > array.
> >
> > Kind regards
> >
> > J�rgen Hoffmann
> >
> > Am Do, den 23.09.2004 schrieb [EMAIL PROTECTED] um 22:58:
> >
> > > Hi,
> > >
> > > ok, I want to validate some dynamically generated forms with intake.
My
> > > problem is that the actual number of input fields depends on the user
> > and
> > > can change every time the form is loaded, so it is not possible to
match
> > > every field with an entry in intake.xml. The names of the input-fields
> > all
> > > start with the same identifier, but end with an unique id. I thought
> > that I
> > > can cut of this id in some way and than check the fields using intake.
> > Is
> > > this possible? My problem is that I can't figure out when exactly the
> > data
> > > from the form is passed to intake.
> > >
> > > Thx Andreas
> > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > >
> > > !EXCUBATOR:4153292c255596545359466!
> >
> >
> 
> 
> ---------------------------------------------------------------------
> 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]
> 
> 



-- 
Thanks

Ben

---------------------------------------------------------------------
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]

Reply via email to