cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Derek Hohls" <>
Subject Re: Limiting number of repeater rows in CForms
Date Mon, 05 Jul 2004 06:28:00 GMT
Thanks Upayavira

I think even a simple example will help a lot;
I looked in the archives, but cannot really see
anything along these lines.


>>> 2004/07/04 04:15:45 PM >>>
Derek Hohls wrote:

>This seems like it shoukld be a very simple
>thing to do, but I could not find answer yet...
>How do I set up a mechanism for limiting
>the numbers of rows that can can be added 
>to a repeater widget... ideally I'd also like
>to disable the "add" button when the no. of
>row = max.
You could do this within the FormHandler function, that you can pass to

your form.

That will get an event with an action of something like 'add-row'. You

can then query the form, count how many lines, and return false if you

don't want it to add more lines.

See if you can work this out. If not, I'll dig out an example.

As to disabling, when I've done this, I've just passed everything 
necessary to make the decision as to whether or not to show a widget on

into the stylesheet, so the stylesheet can then format the widget 

Make sense?

Regards, Upayavira

To unsubscribe, e-mail: 
For additional commands, e-mail: 

This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
MailScanner thanks transtec Computers for their support.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message