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:
| Event | How to listen |
|---|---|
DOM event kodasteps:step | document.addEventListener('kodasteps:step', e => console.log(e.detail)); |
jQuery event kodasteps_step | jQuery(document).on('kodasteps_step', (event, detail) => { … }); |
Gravity Forms action kodasteps_step_change | gform.addAction('kodasteps_step_change', detail => { … }); |
| Property | Value |
|---|---|
formId | The form ID |
from | The step left, counted among the steps showing (1 = first) |
step | The step opened, counted the same way |
total | How many steps are showing |
name | The 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:
| Member | What 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. |
current | The 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.
Thanks for letting us know.
