Closed d4mation closed 6 years ago
Revisiting this. Turns out it is due to #22. There is no $args
parameter for rbm_do_field_repeater()
and instead, $args
gets assigned within the function to be otherwise empty outside of its defaults and the provided Fields.
Well, that and the Repeater Class doesn't utilize $args
for anything else and I just assumed it did, lol
Workaround:
// Can't use the fancy function shorthand since we need full access to $args to set no_init
new RBM_FH_Field_Repeater( 'prefix_park_hours_exceptions', false, array(
'no_init' => true,
'fields' => array(
'date' => array(
'type' => 'datepicker',
'label' => 'Date',
),
'hours' => array(
'type' => 'text',
'label' => 'Park Hours',
'args' => array(
'default' => '9 a.m. to 5 p.m.',
)
)
)
), get_option( 'prefix_park_hours_exceptions' ) );
This is fixed in the rewrite.
Description doesn't appear to render. Not sure why as the Repeater just calls the Field directly.
Didn't work for either Media (Image) or Text.