Remove symbol padding from currency
add_filter( ‘frm_currencies’, ‘remove_euro_symbol_padding’ ); function remove_euro_symbol_padding( $currencies ) { $currencies[‘EUR’][‘symbol_padding’] = ”; return $currencies; }Continue reading
Join 2,000,000+ Professionals who use WPCode to Future-Proof Their Websites!
add_filter( ‘frm_currencies’, ‘remove_euro_symbol_padding’ ); function remove_euro_symbol_padding( $currencies ) { $currencies[‘EUR’][‘symbol_padding’] = ”; return $currencies; }Continue reading
add_filter( ‘frm_reg_login_limit_feature_activated’, ‘__return_true’ );Continue reading
add_filter( ‘frm_validate_entry’, ‘remove_spam_error’ ); function remove_spam_error( $errors ) { if ( ! array_key_exists( ‘spam’, $errors ) || FrmAppHelper::get_ip_address() ) { return $errors; } if ( __( ‘Your entry appears to be spam!’, ‘formidable’ ) === $errors[‘spam’] ) { unset( $errors[‘spam’]…Continue reading
add_filter(‘frm_formatted_entry_values_content’, ‘show_field_name_in_api_result’, 10, 2); function show_field_name_in_api_result( $content, $args ) { $entry_id = 58191; // change 58191 to your entry ID if ( $entry_id !== (int) $args[‘entry’]->id || ! is_array( $content ) || ‘array’ !== $args[‘format’] ) { return $content; }…Continue reading
add_action( ‘frmapi_post_response’, ‘frm_get_api_response’, 10, 3 ); function frm_get_api_response( $response, $entry, $form_action ) { $status = wp_remote_retrieve_response_code( $response ); if ( $status == 200 ) { add_filter(‘frm_main_feedback’, ‘frm_add_200_to_message’ ); } else { add_filter(‘frm_main_feedback’, ‘frm_add_500_to_message’ ); } } function frm_add_200_to_message( $message )…Continue reading
add_filter( ‘frm_api_request_args’, ‘my_custom_frm_api_request_header’, 10, 2 ); function my_custom_frm_api_request_header( $arg_array, $args ) { if ( $args[‘url’] == ‘http://test.com’ ) { // the full url where the request is being sent $arg_array[‘headers’][‘my_header_name’] = ‘my_header_value’; $arg_array[‘headers’][‘another_header_name’] = ‘a_header_value’; } return $arg_array; }Continue reading
add_filter( ‘frm_api_request_args’, ‘my_custom_function’ ); function my_custom_function( $args ) { $body = json_decode( $args[‘body’], true ); if ( isset( $body[‘owner_id’] ) ) { $body[‘owner_id’] = (int) $body[‘owner_id’]; $args[‘body’] = json_encode( $body ); } return $args; }Continue reading
add_filter( ‘frm_api_request_args’, ‘extend_api_timeout’ ); function extend_api_timeout( $args ) { $args[‘timeout’] = 30; // change this return $args; }Continue reading
add_filter( ‘frm_setup_new_fields_vars’, ‘translate_countries’, 20, 2 ); add_filter( ‘frm_setup_edit_fields_vars’, ‘translate_countries’, 20, 2 ); function translate_countries( $values, $field ) { $field_id = 4865; // change 4865 with the ID of your Country list dropdown field. if ( $field_id !== (int) $field->id )…Continue reading
add_filter(‘frm_validate_field_entry’, ‘check_valid_email’, 10, 3); function check_valid_email($errors, $posted_field, $posted_value){ if($posted_field->id == 7762){ //change 7762 to the ID of the email field $postedemail=$_POST[‘item_meta’][7762]; //Change 7762 to the ID of the email field $alloweddomain = explode(‘@’,$postedemail)[1]; if (!filter_var($postedemail, FILTER_VALIDATE_EMAIL) || $alloweddomain != ‘example.com’)…Continue reading