Getting multiple choice field value after entry update [RESOLVED]


I have been trying to find the selected choice of a multiple choice field (could be radio buttons or list etc doesn’t matter), After an entry has been modified in wordpress’s backend.

Currently i’m trying to do it inside a function fired by the hook gform_post_update_entry_property but maybe it’s not the right hook/filter ?

I was using this one because i assumed i could directly use the $value or $property function parameters but no such luck.

I’ve tried these 2 methods on multiple types of fields with no success:

 add_action( 'gform_post_update_entry_property','after_entry_modif', 10, 4 );
 function after_entry_modif($entry){

     $form = GFAPI::get_form(2);
     $field = RGFormsModel::get_field( $form, 8 );
     $value = is_object( $field ) ? $choice_field->get_value_export( $entry, 8, true ) : '';


     $value_list = maybe_unserialize( rgar( $entry, '9' );

I’ve also tried looping over the choices, i can get the text or value, but i still can’t get wich is selected.

Can you explain what you’re trying to achieve exactly? Maybe we can come up with a different approach.

Thank you for taking the time to look at my issue.

So i have a form with an administration field that has 3 option “Pending” “Validated” “Error”.

Each entry from that form will be reviewed manually in the back-end of wordpress.

What i need is a hook that gets triggers after one of these entry has been updated AND have access inside of that function to that field and be able to know wich of the option was selected.

Ideally i’d prefer doing it using gravity forms functions, but i could also pull the result directly from the database if there’s no other way.

I think the hook i tried using triggered before the database was updated with this field’s meta value, hence why i couldn’t see wich of the field’s choices had been selected.

1 Like

You can use the gform_after_update_entry hook for that:

gform_post_update_entry_property would only run after updating an entry property, like the date submitted, read status, starred status, etc. The gform_after_update_entry hook runs after updating an entry (like changing the status to Pending/Validated/Error) and has access to the original entry, and the entry ID, so you should be able to do what you want there. Let us know if you have any other questions.

1 Like

The filter which Chris linked to is absolutely the right call for handling updates via the Forms > Entries screen in the admin. Have you looked at Gravity Flow by chance?

It can allow you to provide more granular control over which fields on an entry can be edited via user input step or even improve the process further with one-click approval links. Both of which could also be setup via block or shortcode to display entries awaiting action on the front-end of your website.

There are also a wide variety of hooks that would let you customize where needed. From your initial description, using gravityflow_step_complete following a successful approval might be a good place to take whatever action is needed “After an entry has been modified”.


Hello, thank you both for your answers.

The gform_after_update_entry hook was exactly what i was looking for.

I struggled a bit at first but it was because i didn’t read the doc properly and didn’t realised the first $entry parameter was an ID and not an entry object.

But after adding this line everything works exactly as intended:

function after_entry_modif($form, $entry_id){
    $entry = GFAPI::get_entry( $entry_id );

As for the gravity flow pluggin i don’t think it will be necessary given this is a pretty small project, but i’ll keep it in mind in case we ever scale up.

Thanks again for your time :slight_smile: