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

Convert number field value to integer

add_filter(‘frm_acf_frm_to_acf’, ‘frm_acf_frm_to_integer’ , 10, 2); function frm_acf_frm_to_integer( $new_value, $args ) { if ( ‘number’ === $args[‘acf_field’][‘type’] && ‘number’ === $args[‘frm_field’]->type ) { $new_value = intval( $new_value ); } return $new_value; }Continue reading

Add your custom data to the backend JS

add_filter(‘frm_acf_backend_js_data’, ‘acf_backend_js_data’, 10, 2}; function acf_backend_js_data( $data, $args ) { $data[‘form_action_id’] = $args[‘form_action’]->ID; $data[‘strings’][‘custom_string’] = ‘Your custom string’; $data[‘custom_data’] = ‘Your custom data’; return $data; }Continue reading