Ajaxformloop add row link max size.

2015-07-13 Thread Stephen Nutbrown
Hi!

Wohoo, I'm getting married next year and I'm currently in the process of
setting up a small wedding website for my guests to RSVP. However, I have a
small problem which I'm sure has a simple solution, I just can't see it.

I have an ajaxformloop for the guests to add +1s. Some have more allocated
than others (eg some have kids etc). I'm using the form to collect names
for placemats and drink preferences etc.

I have a value from an Invite object  which represents the max number of
guests for the invite. My ajaxformloop should only let them add that many
guests using the add row link.

I've tried returning null from my onAddNewRow event and it didn't like
that.

I've also tried putting a t:if around the add new row link, however this
doesn't work, probably because it's ajax and doesn't update this part.

Is there a max size parameter or something similar for the add row link or
the ajaxformloop? Or perhaps there is another easy way, I'm sure there will
be but I can't spot it.

Thanks,
Steve


Re: Ajaxformloop add row link max size.

2015-07-13 Thread Lance Java
You could put the add row link in a zone and update the zone with nothing
(via AjaxResponseRenderer) when the max is hit.