Example, so I know what to check for?
Hi Michael, example:
Code:
$actions->add_group_field($actionGroup, array(
'name' => 'Repeatable Text',
'id' => $prefix . 'mytext',
'type' => 'text',
'repeatable' => true,
'attributes' => array(
'placeholder' => 'Do Something',
),
));
Result:
Not seeing the result portion.
I have to wonder if it’s a similar thing to the answer I have at https://ww.wp.xz.cn/support/topic/how-do-i-relabel-media-button-in-file-type?replies=5#post-7053479 regarding the button text for file uploads.
No.
This code change the upload button text in a file field.
I want change the text in button of “add row” in a repeatable field, see: http://angelorocha.com.br/wp-content/uploads/2015/06/cmb-repeatable-field.png
Which is why I said “similar” 🙂 It wouldn’t be an exact copy/paste, but something along those lines.
Try passing in the following:
'options' => array( 'add_row_text' => 'CUSTOM BUTTON TEXT' )
Try it on both the group and the individual repeatable field, in case one or the other doesn’t work.
Works fine, thanks Michael.
Thank you guys.
And just in case if someone needs to change the remove button label:
'options' => array( 'remove_row_text' => 'CUSTOM BUTTON TEXT' )