Using Gravity Forms ‘gform_signature_url’ PHP filter

The gform_signature_url Gravity Forms PHP filter allows the signature URL to be customized.

Usage

To apply the filter for all forms:

add_filter('gform_signature_url', 'your_function_name', 10, 4);

To target all signature fields in a specific form, add the form ID after the hook name:

// This targets all fields in form 6
add_filter('gform_signature_url_6', 'your_function_name', 10, 4);

To target a specific field in a specific form, add the form ID and field ID after the hook name:

// This targets field 1 in form 6
add_filter('gform_signature_url_6_1', 'your_function_name', 10, 4);

Parameters

  • $url (string): The signature URL.
  • $filename (string): The signature filename, excluding extension.
  • $form_id (int): The ID of the form used to create the requested signature.
  • $field_id (int): The ID of the field used to create the requested signature.

More information

See Gravity Forms Docs: gform_signature_url

Examples

Enable transparency

This example adds a query parameter to the signature URL to enable transparency:

add_filter('gform_signature_url', 'enable_signature_transparency', 10, 4);

function enable_signature_transparency($url, $file_name, $form_id, $field_id) {
    return add_query_arg('t', 1, $url);
}