Description
Enables the entry meta conditional logic filters to be modified on the notification edit page.
Usage
add_filter( 'gform_entry_meta_conditional_logic_notifications', 'conditional_logic_filters', 10, 3 );
Parameters
- $filters array
The array of filters
-
$form Form Object
The form object
Examples
This example removes certain entry meta filters depending on the form settings.
add_filter( 'gform_entry_meta_conditional_logic_confirmations', 'conditional_logic_filters', 10, 3 ); function conditional_logic_filters($filters, $form, $id) { $quiz_fields = GFAPI::get_fields_by_type( $form, array( 'quiz' ) ); if (empty($quiz_fields)) return $filters; switch ( self::get_form_setting( $form, 'grading' ) ) { case "letter" : if ( false === isset( $form['gquizDisplayConfirmationLetter'] ) || $form['gquizDisplayConfirmationLetter'] ) unset( $filters['gquiz_is_pass'] ); break; case "passfail" : if ( false === isset( $form['gquizDisplayConfirmationPassFail'] ) || $form['gquizDisplayConfirmationPassFail'] ) unset( $filters['gquiz_grade'] ); break; default: unset( $filters['gquiz_grade'] ); unset( $filters['gquiz_is_pass'] ); } return $filters; }
Placement
This code should be placed in the functions.php file of your active theme.
Source Code
This action hook is located in GFNotification::notification_edit_page() in notification.php