{entry_url} Merge Tag

{entry_url} Merge Tag

SummaryUsageNotesSee Also

Summary
Displays a URL that will take you to detail page for the submitted entry.
Usage
{entry_url}
Notes
This merge tag can be used in areas such as notifications and confirmations after the entry has been saved. Because of this timing, they cannot be used as a field』s default value.
Clicking through to the URL requires the user to be logged in with appropriate permissions.
See Also
The {entry} merge tag.

Form Footer CSS Selectors

Form Footer CSS Selectors

ContainerSubmit ButtonSubmit Button (image)

Container
Contains the submit button and admin edit link

example: the form footer section (div) – applies to all forms
body .gform_wrapper .gform_footer {border: 1px solid red}

example: the form footer section (div) – applies just to form ID #1
body #gform_wrapper_1 .gform_footer {border: 1px solid red}

Submit Button

example: the form submit button (input) – applies to all forms
body .gform_wrapper .gform_footer input[type=submit] {border: 1px solid red}

example: the form submit button (input) – applies just to form ID #1
body #gform_wrapper_1 .gform_footer input[type=submit] {border: 1px solid red}

Submit Button (image)

example: the form submit button (image) – applies to all forms
body .gform_wrapper .gform_footer input[type=image] {border: 1px solid red}

example: the form submit button (image) – applies just to form ID #1
body #gform_wrapper_1 .gform_footer input[type=image] {border: 1px solid red}

Field Map Field

Field Map Field

IntroductionParametersExampleHelpersget_field_map_fields()get_field_value()Uses

Introduction

The field_map type field, part of the Settings API, allows the user to map their form fields to fields you define, e.g. fields you will be sending to a third-party service such as a CRM.

Parameters

name string Required. Name of the field. Use it to retrieve saved data.label string Required. Field label. Will be displayed in the UItype string Required. Field type. Must be set to field_map for the Field Map fieldtooltip string Optional. Defaults to blank (no tooltip). Displays a question mark icon and a tooltip next to the field label.field_map arrayRequired. Array that defines the fields to be mapped.Each item in the field_map array has the following properties:name stringRequired. Name of the field to be mapped. To be used when retrieving the selected value.label stringRequired. Label to be displayed in the UI.required boolOptional. Defaults to false. Possible values are true or false. Marks this field as required, which means it must be mapped to a form field.default_value stringOptional. Defaults to blank (nothing is pre-selected). Allowed values are field IDs. When specified, the form field drop down is pre-selected with the appropriate field.validation_callback (function)Optional. Defaults to nothing (no callback). Calls a function during validation allow for custom validation logic. The example in the existing documentation page is good.

Example

array(
'title' => esc_html__( 'This is the title for Section 1', 'sometextdomain' ),
'fields' => array(
array(
'name' => 'contactStandardFields',
'label' => esc_html__( 'Map Fields', 'sometextdomain' ),
'type' => 'field_map',
'field_map' => $this->standard_fields_for_feed_mapping(),
'tooltip' => '

' . esc_html__( 'Map Fields', 'sometextdomain' ) . '

' . esc_html__( 'Select which Gravity Form fields pair with their respective third-party service fields.', 'sometextdomain' )
),
),
),

Here』s the function being used to define the fields for the field_map property.

public function standard_fields_for_feed_mapping() {
return array(
array(
'name' => 'first_name',
'label' => esc_html__( 'First Name', 'sometextdomain' ),
'required' => true,
'field_type' => array( 'name', 'text', 'hidden' ),
'default_value' => $this->get_first_field_by_type( 'name', 3 ),
),
array(
'name' => 'last_name',
'label' => esc_html__( 'Last Name', 'sometextdomain' ),
'required' => true,
'field_type' => array( 'name', 'text', 'hidden' ),
'default_value' => $this->get_first_field_by_type( 'name', 6 ),
),
array(
'name' => 'email_address',
'label' => esc_html__( 'Email Address', 'sometextdomain' ),
'required' => true,
'field_type' => array( 'email', 'hidden' ),
'default_value' => $this->get_first_field_by_type( 'email' ),
),
);
}

The above code would render the following:

Helpers

The following functions may come in helpful when interacting with the field_map field type during feed processing.

get_field_map_fields()

Retrieves the individual field_map fields from the meta property of the Feed Object for the supplied field name.

$contact_standard_fields = $this->get_field_map_fields( $feed, 'contactStandardFields' );

$feed Feed Object
The Entry Object to be checked.

$name string
The name property of the field_map field to retrieve the mapped fields for.

Returns array
An array containing the field names as the keys to the mapped form field ID or entry meta key.

get_field_value()

Retrieves the specified form field or entry meta value. See Accessing Mapped Field Values During Feed Processing for more details.

$first_name = $this->get_field_value( $form, $entry, $contact_standard_fields['first_name'] );

Uses

settings_field_map()field_map_table_header()field_map_title()get_mapped_field_name()settings_field_map_select()get_field_map_choices()

Enable Use of the Total Field with Conditional Logic

Enable Use of the Total Field with Conditional Logic

IntroductionUsage LimitationsPlacementSnippetAlternatives

Introduction
The Total field is not made available to configure conditional logic rules, as it is evaluated differently to other fields. The following snippet does make it possible to use in conditional logic rules, but with the limitation that this is only appropriate for conditional logic that takes place after entry submission.
Usage Limitations
Conditional logic using the Total field is only for use on notifications, confirmations and add-on feeds. That is, features where logic is evaluated based on the saved entry.
Because the total field is always the last field to be saved you cannot use it to configure conditional logic on other fields on the form. Displaying other fields based on the total would prevent those fields being saved as the conditions would never match when the logic is evaluated, during submission.
Placement
The snippet should be placed in the functions.php file of your active theme or a custom functions plugin. You will then be able to configure less than and greater than rules based on the value of the Total field.
Snippet
class RW_GF_Total_Field_Logic {

public function __construct() {
add_action( 'init', array( $this, 'init' ) );
}

function init() {
if ( ! property_exists( 'GFForms', 'version' ) || ! version_compare( GFForms::$version, '1.9', '>=' ) ) {
return;
}

add_filter( 'gform_admin_pre_render', array( $this, 'enable_total_in_conditional_logic' ) );
}

function enable_total_in_conditional_logic( $form ) {
if ( GFCommon::is_entry_detail() ) {
return $form;
}

echo "';

return $form;
}

}
new RW_GF_Total_Field_Logic();

Alternatives
Check out our community add-on library to search for the possible options.

Exporting Form Entries

Exporting Form Entries

In this article, we will show you how to export all of your form entries (submissions) to enable further analysis or manipulation in external tools.

First, log into your WordPress admin dashboard.From within inside your WordPress admin, hover over Forms and click on Import/Export.

You should be immediately prompted with the Export Entries tab. Within here, select the form that you want to export the entries for in the dropdown.Once the form to export entries from is selected, additional options will be shown. The first of these settings is the Select Fields option. This will allow you to specifically select the form fields you want to export. Simply select the checkboxes next to each form field that you want to export.

The next available option is Conditional Logic. Here, you are able to export only fields that contain specific information.Lastly, you may also select a date range for the field submissions that are exported. If you leave this blank, all entries will be exported.Once all options are appropriately selected according to your needs, click the Download Export File button. Depending on the amount of information you have within your export it may take some time to download the .csv file.

You have now exported your form entries. From here, what you do with this information is all up to you. This feature is great for backing up your data, as well as generating an offline copy of submissions for further investigation.

File Upload Field CSS Selectors

File Upload Field CSS Selectors

Single File UploadContainerInputMulti-File UploadContainerUpload Instruction TextValidation MessageFile Selection Button

Single File Upload
Container
example: file upload container (div) – applies to all forms
1body .gform_wrapper .gform_body .gform_fields .gfield .ginput_container_fileupload {border: 1px solid red;}
example: file upload container (div) – applies just to form ID #1
1body .gform_wrapper_1 .gform_body .gform_fields .gfield .ginput_container_fileupload {border: 1px solid red;}
example: file upload container (div) – applies just to specific container (based on the unique parent element ID – replace 「XX_X」 with your actual element ID)
1body .gform_wrapper_1 .gform_body .gform_fields #field_XX_X.gfield .ginput_container_fileupload {border: 1px solid red;}
Input
example: file upload input (input) – applies to all forms
1body .gform_wrapper .gform_body .gform_fields .gfield .ginput_container_fileupload input {color: red;}
example: file upload input (input) – applies just to form ID #1
1body .gform_wrapper_1 .gform_body .gform_fields .gfield .ginput_container_fileupload input {color: red;}
example: file upload input (input) – applies just to specific container (based on the unique parent element ID – replace 「XX_X」 with your actual element ID)
1body .gform_wrapper_1 .gform_body .gform_fields #field_XX_X.gfield .ginput_container_fileupload input {color: red;}
Multi-File Upload
Container
example: multi-file upload container (div) – applies to all forms
1body .gform_wrapper .gform_body .gform_fields .gfield .ginput_container_fileupload {border: 1px solid red;}
example: multi-file upload container (div) – applies just to form ID #1
1body .gform_wrapper_1 .gform_body .gform_fields .gfield .ginput_container_fileupload {border: 1px solid red;}
example: multi-file upload container (div) – applies just to specific container (based on the unique parent element ID – replace 「XX_X」 with your actual element ID)
1body .gform_wrapper_1 .gform_body .gform_fields #field_XX_X.gfield .ginput_container_fileupload {border: 1px solid red;}
Upload Instruction Text
example: file upload container (span) – applies to all forms
1body .gform_wrapper .gform_body .gform_fields .gfield .ginput_container_fileupload .gform_drop_instructions {color: red;}
example: file upload container (span) – applies just to form ID #1
1body .gform_wrapper_1 .gform_body .gform_fields .gfield .ginput_container_fileupload .gform_drop_instructions {color: red;}
example: file upload container (span) – applies just to specific container (based on the unique parent element ID – replace 「XX_X」 with your actual element ID)
1body .gform_wrapper_1 .gform_body .gform_fields #field_XX_X.gfield .ginput_container_fileupload .gform_drop_instructions {color: red;}
Validation Message
example: file upload validation message (div) – applies to all forms
1body .gform_wrapper .gform_body .gform_fields .gfield .ginput_container_fileupload .validation_message {color: red;}
example: file upload validation message (div) – applies just to form ID #1
1body .gform_wrapper_1 .gform_body .gform_fields .gfield .ginput_container_fileupload .validation_message {color: red;}
example: file upload validation message (div) – applies just to specific container (based on the unique parent element ID – replace 「XX_X」 with your actual element ID)
1body .gform_wrapper_1 .gform_body .gform_fields #field_XX_X.gfield .ginput_container_fileupload .validation_message {color: red;}
File Selection Button
example: file selection button (input) – applies to all forms
1body .gform_wrapper .gform_body .gform_fields .gfield .ginput_container_fileupload .gform_button_select_files {color: red;}
example: file selection button (input) – applies just to form ID #1
1body .gform_wrapper_1 .gform_body .gform_fields .gfield .ginput_container_fileupload .gform_button_select_files {color: red;}
example: file selection button (input) – applies just to specific container (based on the unique parent element ID – replace 「XX_X」 with your actual element ID)
1body .gform_wrapper_1 .gform_body .gform_fields #field_XX_X.gfield .ginput_container_fileupload .gform_button_select_files {color: red;}

Email Tracking with Postmark

Email Tracking with Postmark

By using the Postmark Add-On to send form notifications, you have the ability to take advantage of additional email features within Postmark. These features include the ability to track data within the form notifications, such as if the notification has been opened. In this article, we』ll show you how to enable tracking within your form notifications.

Access the form notification that is configured to use Postmark. If you don』t already have a notification that is using Postmark, see our article on sending form notifications with Postmark.Scroll down in the settings until you see an option labeled Email Tracking.Check the box labeled Enable open tracking for this notification to enable tracking of who has opened your form notifications.Save your settings.

That』s all there is to it! With tracking settings enabled, you will be able to better track if a form notification has been opened.

Dynamically Populating the Post Author

Dynamically Populating the Post Author

Registering a Function to a HookGetting and Returning the ValueUsing 『Admin Only』 FieldsConclusion

If you aren』t familiar with dynamic population with Gravity Forms, it is probably worth your while to take a quick breeze through the Using Dynamic Population walk-through.
This walk-through demonstrates how to retrieve the author』s email based on the post that the Gravity Form is being displayed.
Let』s jump right into the code!
add_filter( 'gform_field_value_author_email', 'populate_post_author_email' );
function populate_post_author_email( $value ) {
global $post;

$author_email = get_the_author_meta( 'email', $post->post_author );

return $author_email;
}

The first thing you would do with this code is copy and paste it into your theme』s functions.php file. Now let』s break it down line by line to get a better understanding of what is happening.
Registering a Function to a Hook
add_filter( 'gform_field_value_author_email', 'populate_post_author_email' );

With this line, we are registering a custom function populate_post_author_email to the gform_field_value_parameter_name filter. All this means is when Gravity Forms is rendering the form on a page it will call our custom populate_post_author_email function *and then* populate the value returned by our custom function into the field.
So how does Gravity Forms know which field to populate with the returned value? The dynamic population parameter! Note that you can apply the same parameter name to as many fields as you』d like and this code would populate them all.
Ready for the next bit of code?
Getting and Returning the Value
The next step is getting the value we want to populate into the field and then returning it so Gravity Forms can populate our field.
global $post;

$author_email = get_the_author_meta( 'email', $post->post_author );

return $author_email;

In this example, we want to get the author』s email based on the post that the Gravity Form is embedded in. To get access to all the juicy post details, we need to declare the $post object global. We can now access various properties of the current post.
One of those properties is the post_author which is the ID of the current post』s author. Why do we need this? To get the author』s email of course! We』ll pass the author』s ID and the author meta (aka 』email』) we are looking for to the WordPress get_the_author_meta function. This function will then return the… you guessed it, author email.
Now all we have to do is return the author』s email back to Gravity Forms which will automatically populate our field with the returned value.
Using 『Admin Only』 Fields
We』ve got our field populating with the post author』s email perfectly… but then you do your first test submission and realize that the author』s email is included in the {all_fields} token when the email notification is generated. You』d prefer that this field only be visible to the admin. What do you do?
You set the field』s visibility to Administrative and update the merge tag to {all_fields:noadmin}. This will prevent the field from displaying in the default notification emails. If the field has dynamic population enabled, this field will display as a hidden field when the form is displayed. If dynamic population is not enabled, the field will not display at all.
Conclusion
Let us know if you have any questions on this or suggestions to better explain this functionality.

Emma Feed Meta

Emma Feed Meta

IntroductionUsagePropertiesCustom Field Properties

Introduction
The Feed Object meta for the Emma add-on is an associative array containing the properties which determine how the add-on should process the form submission.
$feed['meta'] = array(
'feed_name' => 'Your Feed Name',
'email_address' => '2',
'custom_fields' => array(),
'feed_condition_conditional_logic' => true,
'feed_condition_conditional_logic_object' => array(
'conditionalLogic' => array(),
),
);

Usage
We recommend accessing the $feed meta using the rgar() or rgars() functions, e.g.:
$conditional_logic_enabled = rgars( $feed, 'meta/feed_condition_conditional_logic' );

Properties

feed_name string
The feed name which appears on the add-ons feeds tab.

group string
The Emma Group ID this feed will add the member to.

email_address string
The ID of the form field containing the member email.

custom_fields array
A multidimensional array containing the Emma contact fields. See Custom Field Properties.

double_optin boolean
Should Emma send a confirmation email to the member. Default is false.

feed_condition_conditional_logic boolean
Is the feed condition (conditional logic) setting enabled. Default is false.

feed_condition_conditional_logic_object array
An associative array containing the conditional logic rules. See the Conditional Logic Object for more details.

Custom Field Properties
array(
'key' => 'address-full',
'value' => '3',
)

Each custom field is an associative array containing the following properties:

key string
The Emma contact fields Shortcut name.

value string
The ID of the form field or entry meta item containing the value for this custom field.