Gform get meta

(Usage)
(Usage)
 
Line 7: Line 7:
<pre class="brush:php">
<pre class="brush:php">
-
// retrieve the referrer meta value for entry ID 3
+
$meta_value = gform_get_meta($entry_id, $meta_key);
-
$referrer = gform_get_meta($entry_id, $meta_key);
+
</pre>
</pre>

Latest revision as of 20:27, 25 August 2011

Description

Retrieves the meta value of the specified meta key from the Entry Meta table.

Usage


$meta_value = gform_get_meta($entry_id, $meta_key);

Parameters

entry_id
(integer) The ID of the entry.
meta_key
(string) The meta key of the meta value you wish to retrieve.

Examples

This example retrieves the referrer information stored in the entry meta and echos it to the screen.


function display_referrer($entry_id) {
    
    $referrer = gform_get_meta($entry_id, 'referrer');
    echo $referrer;
    
}

Source Code

This function is located in forms_model.php

Search the Documentation