Submission API not returns all fields on its response in confirmation field when updating on after_submission action

Hi All

We use the API to submission forms
e,g
Hi All

We are using Gravityforms Rest API
We allow different users ,
which are in ROLE Subscriber (Not Administrator)
to submit a spesific form by API

e.g
/wp-json/gf/v2/forms/3/submissions
{
“input_3”: “2”,
“input_1”: “UniqeTransactionId”
}

for the specific form , we added the after_submission action. And in that method we update an additional field ( configured as hidden)

add_action(“gform_after_submission_3”, “set_post_content3”, 10, 2);
function set_post_content3($entry, $form){
$uuid = get_custom_uuid();
GFAPI::update_entry_field($entry_id, ‘4’, $uuid);
}

The result of the API , in the “confirmation’ fields, dont returns the value of field 4
“confirmation_message”: “{"id":"912","form_id":"3","post_id":null,"date_created":"2024-08-13 10:40:16","date_updated":"2024-08-13 10:40:16","is_starred":"0","is_read":"0","2":"**”,"4":""}**”,

and only after calling the entry API, we get the entry with the value 4
is there a configuration that can return on the “confirmation” field all values ?
is there a different way to update the form field ?( using different action or hook)/
appreciate any help
Yoav

Have you considered using the get_custom_uuid function via the gform_save_field_value filter, so the field value is set with the correct value just before the entry is saved to the database?

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