Skip to main content

gform_update_meta()

function gform_update_meta( $entry_id, $meta_key, $meta_value, $form_id=null )

Add or update metadata associated with an entry.

Data will be serialized. Don't forget to sanitize user input.

Since:

  • Unknown
  • 2.5 (Return the result of the query.)

Source: forms_model.php:8468

Parameters

NameTypeDefaultDescription
$entry_idintThe ID of the entry to be updated.
$meta_keystringThe key for the meta data to be stored.
$meta_valuemixedThe data to be stored for the entry.
$form_idint | nullnullThe form ID of the entry (optional, saves extra query if passed when creating the metadata).

Returns

  • int | false — Returns the number of affected rows, or false if the operation fails.