Docs & Support

Learn about all the Formidable features and get support from our amazing customer success team.

frm_pre_update_entry

This hook allows you to do something with the data that was entered in the form before it is changed and the form is updated.

Usage

add_filter( 'frm_pre_update_entry', 'check_if_value_changed', 10, 2 );
function check_if_value_changed( $values, $entry_id )

Parameters

  • $values (array)
  • $entry_id (integer)

Examples

Please select a valid form

Check If Value Has Changed

You can use the following example to check to see if a value has changed. In this specific example, if the value has not changed, an email notification will not be sent.

add_filter( 'frm_pre_update_entry', 'check_if_value_changed', 10, 2 );
function check_if_value_changed( $values, $entry_id ) {
  $field_id = 125; // change 125 to the id of the field to check
  $previous_value = FrmEntryMeta::get_entry_meta_by_field($entry_id, $field_id);
  if ( isset( $values['item_meta'][ $field_id ] ) && $values['item_meta'][ $field_id ] == $previous_value ) {
    // do something if the value did not change
	add_action( 'frm_trigger_email_action', 'frm_stop_email', 1 );
  }
  return $values;
}

function frm_stop_email(){
  remove_action( 'frm_trigger_email_action', 'FrmNotification::trigger_email', 10 );
}

Change Log

Added in version 2.0.16

Was this article helpful? *

This article may contain affiliate links. Once in a while, we earn commissions from those links. But we only recommend products we like, with or without commissions.

In this article

    We have a small, but amazing team of dedicated people who are committed to helping you achieve your goals and project requirements.


    Copyright © 2025 Strategy11, LLC. Formidable Forms® is a registered trademark Strategy11, LLC.

    Complete your purchase
    Special offer unlocked.
    Get 55% OFF!
    Complete Purchase
    Join 400,000+ using Formidable Forms to create form-focused solutions fast. Get Formidable Forms