Skip to content
Felipe Elia edited this page Jul 23, 2023 · 5 revisions

The available filters are:

wpcf7_field_group_add_button_atts

Filters the add button attributes.

Parameters:

  • $attributes: Array of attributes for the add button. Keys:
    • group_id: group ID
    • additional_classes: css class(es) to add to the button
    • text: text used for the button

Return value: array of button attributes

Example

// In your theme's functions.php
function customize_add_button_atts( $attributes ) {
	return array_merge( $attributes, [ 'text' => 'Add Entry' ] );
}
add_filter( 'wpcf7_field_group_add_button_atts', 'customize_add_button_atts' );

wpcf7_field_group_add_button

Filters the add button HTML.

Parameters:

  • $html: Default add button HTML
  • $group_id: The group ID

Return value: button HTML

wpcf7_field_group_remove_button_atts

Filters the remove button attributes.

Parameters:

  • $attributes: Array of attributes for the remove button. Keys:
    • group_id: group ID
    • additional_classes: css class(es) to add to the button
    • text: text used for the button

Return value: array of button attributes

wpcf7_field_group_remove_button

Filters the remove button HTML.

Parameters:

  • $html: Default remove button HTML
  • $group_id: The group ID

Return value: button HTML