gpnf_modal_button_css_classes (JS)

  1. Description
  2. Usage
  3. Parameters
  4. Example
    1. Add a custom class to all buttons
  5. Since


Filter the CSS classes of buttons in the Nested Form modal.


gform.addFilter('gpnf_modal_button_css_classes', 'my_custom_function' );


  • buttonClasses string

    CSS classes for the button

  • buttonType string

    The button type. Will be one of the following: submit, next, previous, delete, cancel, or cancel-mobile

  • formId int

    The parent form ID.

  • fieldId int

    The field ID of the Nested Form field.

  • gpnf \GPNestedForms

    The current GP_Nested_Form_Field object.


Add a custom class to all buttons

gform.addFilter('gpnf_modal_button_css_classes', function(classes) {
  classes += ' custom-class';
  return classes;
} );


This filter is available since Gravity Forms Nested Forms 1.0-beta-10.1.