Support

Account

Home Forums General Issues Action to check if specific field value changed on post update? Reply To: Action to check if specific field value changed on post update?

  • Thanks for your quick reply! Your example worked to compare the values, but the $old_value is returning an array rather than a single value. This is the output from print_r($field):

    Array ( [key] => field_56607351f4d8b [label] => Delivery Method [name] => delivery_method [_name] => delivery_method [type] => text [order_no] => 1 [instructions] => [required] => 0 [id] => acf-field-delivery_method [class] => text [conditional_logic] => Array ( [status] => 0 [allorany] => all [rules] => 0 ) [default_value] => [allow_null] => 0 [multiple] => 0 [formatting] => html [maxlength] => [placeholder] => [prepend] => [append] => ) 1

    I’m not sure the difference between [name] and [_name] but perhaps since they have the same value, that’s why I’m getting an array?