Hooks and data
Updated November 9, 2026
KodaFill is built on Gravity Forms’ own add-on framework. These hooks and functions are safe to use.
Filters
kfill_today
The date KodaFill uses as {today} on the server, as Y-m-d. Defaults to the site’s date.
add_filter( 'kfill_today', function ( $today ) {
return '2027-06-01'; // For testing.
} );
kfill_editing_entry_id
Tells KodaFill that a submitted form is an edit of a saved entry, so only fields whose sources changed are worked out again. Return the entry ID, or 0. KodaDash edit forms are detected already.
add_filter( 'kfill_editing_entry_id', function ( $entry_id, $form ) {
return (int) rgpost( 'my_editor_entry_id' );
}, 10, 2 );
In the browser, add a hidden input named kfill_editing to such a form so fields aren’t worked out when it opens.
Actions
kfill_entry_refilled
Fires after KodaFill changed fields of a saved entry because the entry was edited.
add_action( 'kfill_entry_refilled', function ( $entry_id, $field_ids, $form ) {
// $field_ids: IDs of the fields KodaFill changed.
}, 10, 3 );
Functions
kfill_entry_rerun()
Works out an entry’s filled fields again after you changed it in code, for example with GFAPI::update_entry_field(), which KodaFill doesn’t watch. Pass the entry as it was before, or the IDs of the fields you changed. Returns the IDs of the fields KodaFill changed.
GFAPI::update_entry_field( $entry_id, '4', 'Full camp' );
$form = GFAPI::get_form( $form_id );
$entry = GFAPI::get_entry( $entry_id );
kfill_entry_rerun( $form, $entry, null, array( '4' ) );
kfill_get_config()
Returns a field’s KodaFill settings (see below), or null. Settings saved by GravityLogic are returned converted.
How rules are stored
Each field that fills itself has a kfillConfig property, saved with the form:
[
'enabled' => true,
'mode' => 'set', // or 'suggest' (Fill it only if it's empty)
'readonly' => false, // Visitors can't change this field (with 'set' only)
'default' => '', // If no rule matches
'rules' => [
[
'logic' => 'all', // or 'any'
'conditions' => [
[ 'field' => '2', 'operator' => 'is', 'value' => 'Week 2' ],
],
'value' => '6/14/2027', // a list of choice values for Checkboxes
],
],
]
Operators: is, isnot, >, <, after, before, contains, starts_with, ends_with, is_empty, is_not_empty.
In the browser
When KodaFill changes a field it triggers a normal change event on it, so listen for change as you would for a visitor’s change.
Thanks for letting us know.
