Add custom data to the global JS

add_filter(‘frm_acf_global_js_data’, ‘acf_global_js_data’, 10, 2); function acf_global_js_data( $data, $args ) { $data[‘form_object’] = FrmForm::getOne( $args[‘form_id’] ); $data[‘strings’][‘custom_string’] = ‘Your custom string’; $data[‘custom_data’] = ‘Your custom data’; return $data; }Continue reading

Add custom data to the form action JS

add_filter(‘frm_acf_form_action_js_data’, ‘acf_form_action_js_data’, 10, 2); function acf_form_action_js_data( $data, $args ) { $data[‘form_action_id’] = $args[‘form_action’]->ID; return $data; }Continue reading

Increase quiz outcome limit

add_filter(‘frm_quiz_outcome_action_options’, ‘increase_quiz_outcome_limit’); function increase_quiz_outcome_limit( $options ) { $options[‘limit’] = 200; //Change 200 to your limit. return $options; } add_filter(‘frm_form_action_limit’, function( $limit ) { return 200; //Change 200 to your limit } );Continue reading

Filter page break fields

$page_number = 1; // Reset page name each time an entry shortcode begins. add_filter( ‘frm_show_entry_defaults’, function( $defaults ) use ( &$page_number ) { $page_number = 1; return $defaults; } ); add_filter( ‘frm_display_break_value_custom’, function( $value, $args ) use ( &$page_number )…Continue reading

Turn off file referer check for Zapier

add_filter( ‘frm_check_file_referer’, ‘turnoff_file_referer_check_for_zapier’ ); function turnoff_file_referer_check_for_zapier( $check_referer ) { if ( ! $check_referer ) { return false; } return FrmAppHelper::get_server_value( ‘HTTP_USER_AGENT’ ) !== ‘Zapier’; }Continue reading

Filter the canonical URL for a published View

add_filter( ‘get_canonical_url’, ‘filter_canonical_url_for_view_inside_page’, 10, 2 ); function filter_canonical_url_for_view_inside_page( $canonical_url, $post ) { $target_post_id = 180; //Replace 180 with the target page ID $target_view_id = 179; //Replace 179 wth the specific View ID if ( $target_post_id !== $post->ID ) { return…Continue reading

Change email fields to lowercase

add_filter(‘frm_validate_field_entry’, ’email_field_lowercase_validation’, 8, 3); function email_field_lowercase_validation($errors, $posted_field, $posted_value){ if($posted_field->type == ’email’){ $_POST[‘item_meta’][$posted_field->id] = mb_strtolower($posted_value); } return $errors; }Continue reading