A Repeatable block's repeat() method does some funky stuff, making
sure all fields' constraints, etc are properly re-parented, and also
changing any others() field list.
For example, the following config:
- type: Repeatable
name: bands
- name: foo
- name: bar
- type: Equal
others: foo

$repeatable->repeat(1) will build a block similar to this:
- type: Block
- name: 'bands.foo_1'
- name: 'bands.bar_1'
- type: Equal
others: 'bands.foo_1'

* change 1 *

This has now been updated so it correctly handles items in the
others() list of both short names and full nested-names.
others: ['foo]
others: ['bands.foo']

btw, this is a good thing, because in all other circumstances, the
others() list *must* only contain the full nested-name, so it's
probably a good habit only to use nested-names.

Support for short names will probably be deprecated at some point, but
there's no rush for that. I'll probably just update all doc examples
for now to use the full nested-names.

* change 2 *

It's also been fixed, so any 'when' clauses now also get their 'field'
name updated.

* change 3 *

plugins attached to fields inside a Repeatable block now also get
properly re-parented.

* change 4 *

this one's unrelated to repeatable blocks.
A constraint's 'when' clause no longer required a 'value' or 'values'
argument. In the case that neither are set, the constraint is run if
the applicable field has a true value.


Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 1 of 1 | next ›
Discussion Overview
grouphtml-formfu @
categoriesperl, catalyst
postedFeb 26, '09 at 7:23p
activeFeb 26, '09 at 7:23p

1 user in discussion

Carl Franks: 1 post



site design / logo © 2022 Grokbase