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: foo
- name: bar
- type: Equal
$repeatable->repeat(1) will build a block similar to this:
- type: Block
- name: 'bands.foo_1'
- name: 'bands.bar_1'
- type: Equal
* change 1 *
This has now been updated so it correctly handles items in the
others() list of both short names and full nested-names.
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'
* change 3 *
plugins attached to fields inside a Repeatable block now also get
* 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.
Grokbase › Groups › Perl › html-formfu › February 2009