Events and hooks

Updated November 9, 2026

Step change events

Each time a step opens (not on page load), KodaSteps sends the same details three ways:

EventHow to listen
DOM event kodasteps:stepdocument.addEventListener('kodasteps:step', e => console.log(e.detail));
jQuery event kodasteps_stepjQuery(document).on('kodasteps_step', (event, detail) => { … });
Gravity Forms action kodasteps_step_changegform.addAction('kodasteps_step_change', detail => { … });
PropertyValue
formIdThe form ID
fromThe step left, counted among the steps showing (1 = first)
stepThe step opened, counted the same way
totalHow many steps are showing
nameThe opened step’s name

Google Tag Manager

With Send step changes to Google Tag Manager on (Form Settings → KodaSteps → Moving between steps), each step change also pushes this to window.dataLayer:

{ event: 'kodasteps_step', form_id: 12, step_number: 2, step_name: 'Your ticket', step_total: 4 }

In Tag Manager, create a Custom Event trigger for kodasteps_step and Data Layer Variables for the other keys. KodaSteps doesn’t load Tag Manager itself.

PHP filter: fields left for submit

kodasteps_step_validation_skip_types filters the field types that are not checked on Next (payment and CAPTCHA types by default). Return the array with your types added or removed:

add_filter( 'kodasteps_step_validation_skip_types', function ( $types ) { $types[] = 'my_payment_field'; return $types; } );

JavaScript API

window.KodaSteps.get( formId ) returns the form’s step controller, or null if the form has no steps on the page. It has:

MemberWhat it does
next()Same as clicking Next (checks the step if that’s on).
prev()Same as clicking Previous.
goTo( n )Opens step n, following the same rules as clicking it. n counts every Step field in the form, including hidden ones.
currentThe open step, counted the same way.

Data

  • Step fields have the field type ksteps_tab.
  • Each form’s KodaSteps settings are stored in the form object under ksteps_settings.
  • The form posts the open step in a hidden input named ksteps_current_step.
Was this page helpful?
Scroll to top