The Entry Object contains all properties of a particular entry (i.e. date created, client IP, submitted field values, etc…). It is formatted as an associative array with field Ids being the key to that field’s data.
rgar( $entry, 'date_created' ); // returns the entry date rgar( $entry, '1' ); // returns the value associated with field 1 rgar( $entry, '1.3' ); // returns the value associated with the first name portion of a simple name field 1 rgar( $entry, '1.6' ); // returns the value associated with the last name portion of a simple name field 1 rgar( $entry, '2.4' ); // returns the value associated with the state input for the address field 2
- id integer
The entry’s Id.
The ID of the form from which the entry was submitted.
ID of the user that submitted of the form if a logged in user submitted the form.
The date and time that the entry was created, in the format “yyyy-mm-dd hh:mi:ss” (i.e. 2010-07-15 17:26:58)
Indicates if the entry has been starred (i.e marked with a star). 1 for entries that are starred and 0 for entries that are not starred.
Indicates if the entry has been read. 1 for entries that are read and 0 for entries that have not been read.
Client IP of user who submitted the form.
Source URL of page that contained the form when it was submitted.
For forms with Post fields, this property contains the Id of the Post that was created.
Provides the name and version of both the browser and operating system from which the entry was submitted.
The current status of the entry (ie “Active”, “Spam”, “Trash”).
These $entry properties are only relevant when a Gravity Forms payment gateway add-on is being used.
- currency string
The currency with which the entry was submitted (ie “USD”, “EUR”).
The current payment status of the entry (ie “Processing”, “Pending”, “Active”, “Expired”, “Failed”, “Cancelled”, “Approved”, “Reversed”, “Refunded”, “Voided”).
The date the payment has been received.
The amount of the fulfilled payment; this property is empty until the payment has been received. Sample value: 75
ID of the transaction returned by the payment gateway
Indicates if the entry/order has been fulfilled. 1 for entries that have been fulfilled and 0 for entries that have not been fulfilled.
Indicates the transaction type of the entry/order. 1 for one time payments, 2 for subscriptions.
The value for all submitted fields can be retrieved by using the Field Id as the key to the $entry array.
rgar( $entry, '1' ); // returns the value associated with field 1 rgar( $entry, '2.4' ); // returns the value associated with the state input for the address field 2
The List field type due to its complex setup compared to other field types (it has many rows and columns of data) it’s stored in serialized format, so you need to unserialize it first to access the data.
maybe_unserialize( rgar( $entry, '3' ) ); // unserialize values associated with list field 3
The easiest way to get the checked checkboxes would be to get a comma separated string containing the selected choices without accessing each input in the entry and building the string yourself would be to use the get_value_export method of the field object, here’s an example
$field_id = 18; // Update this number to your field id number $field = RGFormsModel::get_field( $form, $field_id ); $value = is_object( $field ) ? $field->get_value_export( $entry ) : '';
That would return a comma separated list containing the values for the selected choices, if you wanted to use the choice text then you would use the following
$value = is_object( $field ) ? $field->get_value_export( $entry, $field_id, true ) : '';
You can then convert that comma separate list to an array, if you want, using PHP’s explode() function.
Add-On Field Values
See the following pages for details about the entry values for fields added by add-ons: