Updated 14 September 2026
On this page
Description
Changes the data of a field that the summary receives on the page. The summary only sends a fixed set of field properties; add what your JavaScript class needs here. It is available in the class as this.fieldData.
A form specific variant exists as well: add _FORMID to the hook name, for example
gotrls_field_data_3 for form 3.Parameters
$data | Array. The field data
$field | GF_Field. The field
$form | Array. The Gravity Forms form object
Return
Array
Usage
Copy the below code to the functions.php of your child theme or to your snippet plugin.
<?php
add_filter( "gotrls_field_data", function( $data, $field, $form ) {
if ( 'my_rating' === $field->type ) {
$data['maxStars'] = (int) $field->maxStars;
}
return $data;
}, 10, 3 );
Since
version 2.2.0
Didn’t find what you were looking for?
Or contact support and I will help you out.
