You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by taabpr <ta...@aster.pl> on 2004/08/05 12:53:51 UTC
[CForms] Setting the limit for repeater
Hi all,
Is there any way to set up the limit of rows (maximum) for repeater? I
mean, not the validation, but to disable 'add' button when max limit
reached.
Thanks,
Tom
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: [CForms] Setting the limit for repeater
Posted by oceatoon <t....@systheo.com>.
There was an older post giving good ideas about this
http://www.mail-archive.com/users%40cocoon.apache.org/msg16974.html
but it hasn't been quite settled on how to do this.
I will be doing something like this soon :
- I would add a visible="show/hide" attribute to the buttons that need it
- on-form load add a check of the size of the repeater ? if it has reached
the max change visible to hide
- in the pipeline following the forms transformer, make the show/hide html
modification(could be a css style="display:none") in an xsl transformation
according to the @visible.
Theory allways sounds simple :)
Tibor
taabpr wrote:
> Hi all,
> Is there any way to set up the limit of rows (maximum) for repeater? I
> mean, not the validation, but to disable 'add' button when max limit
> reached.
> Thanks,
> Tom
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: [CForms] Setting the limit for repeater
Posted by Scott Yeadon <sc...@anu.edu.au>.
Not sure, haven't tried this, but one way could be to check the size in
a function/class specified in the on-activate element and if it's hit
the size then delete the row immediately and send a message to the user
indicating the maximum size is reached so can't add more rows.
I wouldn't mind knowing how to disable/enable widgets if anyone has done
this...?
taabpr wrote:
> Hi all,
> Is there any way to set up the limit of rows (maximum) for repeater? I
> mean, not the validation, but to disable 'add' button when max limit
> reached.
> Thanks,
> Tom
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org