It would be nice if you set a limit on the number of times a field or set of fields can be repeated. Something like '#multiadd_limit' => 10 would allow you to hit the "Add" button 9 times, displaying 10 sets on the page, and then after that you would not be able to add any more.

Comments

sidharth_k’s picture

Assigned: Unassigned » sidharth_k

Yes. This is a useful feature. I will implement this.

eojthebrave’s picture

Status: Active » Needs review
StatusFileSize
new2.35 KB

Attached patch adds a #multiadd_limit property which defaults to 0 or unlimited. When set the user will only able to add N-1 sets of new fields to the page. Meaning they can never submit more then N copies of any given #multiadd group.

sidharth_k’s picture

Committed to branch 6.x-1.x-dev

Thanks!

sidharth_k’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.