Survey Rating Add-on PHP Object Value [RESOLVED]

Hi,

I am making a custom email with the ‘gform_notification’ filter and I want to access the “Survey Rating” object in PHP.

I am using this function “rgar($entry, ‘6’)” to get the values but it only returns a string.

What is the correct way/function of accessing the object?

Solution provided by support!

$field_id = 6;
$field = GFAPI::get_field( $form, $field_id );
$choice_text = $field->get_value_export( $entry, $field_id, true );
var_dump($choice_text);
1 Like

Thank you for sharing that here for the benefit of others.

1 Like
© 2008 - 2019. Gravity Forms is a project by Rocketgenius Inc.