The gform_paypal_add_option_group filter is used to add groups of options to the PayPal feed in Gravity Forms.
Usage
add_filter('gform_paypal_add_option_group', 'your_function_name', 10, 2);
Parameters
- $feed (Feed Object): The configuration details for the current feed. This will be empty when initially creating a new form.
- $form (Form Object): The form for the current feed. This will be empty when initially creating a new form.
More information
See Gravity Forms Docs: gform_paypal_add_option_group
Examples
Add a group of checkbox fields for custom options
This example adds a group of checkbox fields that allow the user to enable or disable a group of custom options.
add_filter('gform_paypal_add_option_group', 'add_paypal_option_group', 10, 2); function add_paypal_options($feed, $form) { ?> <div class="margin_vertical_10"> <label class="left_header">My Third Party Options</label> <ul style="overflow:hidden;"> <li> <input type="checkbox" value="1" id="my_third_party_label_option" name="my_third_party_label_option"> <label for="my_third_party_label_option" class="inline">Use My Third Party invoice IDs.</label> </li> <li> <input type="checkbox" value="1" id="my_third_party_transactions" name="my_third_party_transactions"> <label for="my_third_party_transactions" class="inline">Send copy of transactions to My Third Party.</label> </li> </ul> </div> <?php }
This filter is located in GFPayPal::settings_custom()
in class-gf-paypal.php
.