|

srfm_add_button_classes

Description

Filters the CSS classes applied to the submit button. Fired in both Free (standard forms) and Pro (conversational forms).

Parameters

  • $classes (array) – The button classes.
  • $id (int) – The form ID (Free only).
  • $block_attrs (array) – The button block attributes (Free only).

Filter Source

PHP
/**
* filter source (Free+Pro) Free: inc/generate-form-markup.php, Pro: inc/pro/conversational-form.php 
*/
apply_filters( 'srfm_add_button_classes', $classes, $id, $block_attrs )

Filter Usage

PHP
add_filter( 'srfm_add_button_classes', 'my_callback', 10, 3 ); 
function my_callback( $classes, $id = 0, $block_attrs = [] ) {
 return $classes;
  }

Filter Example

PHP
add_filter( 'srfm_add_button_classes', 'my_callback', 10, 3 ); 
function my_callback( $classes, $id = 0, $block_attrs = [] ) { 
return $classes; 
}
Was this doc helpful?
What went wrong?

We don't respond to the article feedback, we use it to improve our support content.

Need help? Contact Support
Table of Contents
Scroll to Top