Accessing likert scale(Survey) entries via api or sending via webhook exposes internal likert scale names instead of actual values [RESOLVED]

Hello,
our team uses GF (2.7.3), Survey (3.8) and Webhooks.

We created a Likert scale and tried to send all fields via webhook.
The target of the webhook receives this json:

"6.1": "glikertrow25dad124:glikertcol6170de495",
"6.2": "glikertrowa5d30021:glikertcol6430e41a6",
"6.3": "glikertrow24c5e8ba:glikertcol6170de495",

But it should display the actual value instead.

We get the same output when acessing it via api.

When using the export button to export all entries for a form, it correctly shows all values.

Any idea to fix that? Looks like an issue in the Survey addon for me

Thats the system report (I removed urls)


### Gravity Forms ###

Version: 2.7.3 ✔
Upload folder: /var/www/vhosts/*removed*/wp-content/uploads/gravity_forms/
Upload folder permissions: Writable  ✔
Output CSS: Yes
Output HTML5: Yes
No-Conflict Mode: No
Currency: EUR
Background updates: No
REST API v2: Yes

### Add-Ons ###

Survey: von Gravity Forms - 3.8  ✔
Webhooks: von Gravity Forms - 1.5  ✔

### Database ###

Database Version: 2.7.3  ✔ Your database is up-to-date.
c4jRt9a_gf_form_view:   ✔
c4jRt9a_gf_form_meta:   ✔
c4jRt9a_gf_form:   ✔
c4jRt9a_gf_form_revisions:   ✔
c4jRt9a_gf_entry:   ✔
c4jRt9a_gf_entry_meta:   ✔
c4jRt9a_gf_entry_notes:   ✔
c4jRt9a_gf_draft_submissions:   ✔
c4jRt9a_gf_rest_api_keys:   ✔
c4jRt9a_gf_addon_feed:   ✔

### Translations ###

Site Locale: de_DE
User (ID: 3) Locale: de_DE
Gravity Forms: de_DE
Survey: de_DE
Webhooks: de_DE

### Log Files ###

Gravity Forms API: *removed*
Gravity Forms Core: *removed*
Gravity Forms Webhooks Add-On: *removed*

### Scheduled (Cron) Events Log ###

gravityforms_cron: 2023-04-12 11:05:32
gravityforms_cron: 2023-04-11 11:39:48
gravityforms_cron: 2023-04-11 00:45:42

### WordPress ###

Home URL: *removed*
Site URL: *removed*
REST API Base URL: *removed*
WordPress Version: 6.2 ✔
WordPress Multisite: No
WordPress Memory Limit: 40M
WordPress Debug Mode: No
WordPress Debug Log: No
WordPress Script Debug Mode: No
WordPress Cron: Yes
WordPress Alternate Cron: No
Background tasks: Yes  ✔

### Active Theme ###

Twenty Twenty-Three: von the WordPress team (https://wordpress.org) - 1.0  ✔

### Active Plugins ###

Disable Comments: von WPDeveloper - 2.4.3  ✔
Limit Login Attempts Reloaded: von Limit Login Attempts Reloaded - 2.25.13  ✔
User Role Editor: von Vladimir Garagulya - 4.63.3  ✔
WP 2FA - Two-factor authentication for WordPress: von WP White Security - 2.4.1  ✔
WP Activity Log: von WP White Security - 4.4.3.2  ✔
WP Activity Log for Gravity Forms: von WP White Security - 1.2.3  ✔

### Web Server ###

Software: Apache
Port: 443
Document Root: *removed*

### PHP ###

Version: 8.0.28 ✔
Memory Limit: 128M
Maximum Execution Time: 30
Maximum File Upload Size: 512M
Maximum File Uploads: 20
Maximum Post Size: 512M
Maximum Input Variables: 1000
cURL Enabled: Yes (Version 7.58.0)
OpenSSL: OpenSSL 1.1.1  11 Sep 2018 (269488143)
Mcrypt Enabled: No
Mbstring Enabled: Yes
Loaded Extensions: Core, date, libxml, openssl, pcre, zlib, bz2, calendar, ctype, hash, filter, ftp, gettext, gmp, SPL, iconv, json, Reflection, session, standard, SimpleXML, sockets, mbstring, tokenizer, xml, cgi-fcgi, mysqlnd, bcmath, curl, dba, dom, enchant, fileinfo, gd, imagick, imap, intl, ldap, exif, mysqli, odbc, PDO, pdo_mysql, PDO_ODBC, pdo_pgsql, pdo_sqlite, pgsql, Phar, posix, pspell, redis, soap, sodium, sqlite3, sysvmsg, sysvsem, sysvshm, tidy, xmlreader, xmlwriter, xsl, zip, Zend OPcache

### Database Server ###

Database Management System: MariaDB
Version: 10.1.48 ✔
Database Character Set: utf8
Database Collation: utf8_general_ci

### Date and Time ###

WordPress (Local) Timezone: UTC+0
MySQL (UTC): 2023-04-12 16:08:10
MySQL (Local): April 12, 2023 um 4:08 pm
PHP (UTC): 2023-04-12 16:08:10
PHP (Local): April 12, 2023 um 4:08 pm

Hi Jonathan. With the Webhooks Add-On, if you map individual fields on the Webhooks feed, rather than sending all fields, you will get the values rather than the raw entry data.

If mapping the individual fields will not work for you, you can get the field value like this:

$field = GFAPI::get_field( $form, '22' );
$request_data['6.1'] = $field->get_value_export( $entry, '6.1' );
$request_data['6.2'] = $field->get_value_export( $entry, '6.2' );
$request_data['6.3'] = $field->get_value_export( $entry, '6.3' );

Combine that with the gform_webhooks_request_data filter:

If you have any other questions, please let us know.

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.