If your code is working, at least you are seeing a result. Working from there it is good to understand what is happening.
-
The function is filtering the mail tags by field name and matching only “your-number”. For any other tags, you would need to add further matches.
-
The work is being done on the value submitted by the user using a built in PHP function: number_format(). This will format a number using its defaults, google the function for its usage.
What you really want to do is just replace commas in the submitted value using str_replace instead of number_format.
Change this:
$replaced = number_format( $submitted );
to:
$replaced = str_replace(',', '', $submitted );
You can replace the comma with a space or any character or just omit it as we have here.
Related Posts:
- contactform7 remove tags with “wpcf7_autop false” from functions.php
- Contact Form 7 If Condition
- How can I get $id variable in widget’s form function?
- Refresh page after form action
- Add new user : make the fields First Name and Last name required
- How to call WordPress functions from a form processing script
- what is the meaning of settings_fields()
- update_post_meta for custom field not working upon form submission
- WordPress registration and contact form 7 [closed]
- Gravity Forms – Using a Form to Pre-populate A Gravity Form [closed]
- Ninja form Redirect depending on text field content [closed]
- WordPress upload_mimes not working for front-end uploads of 3D files
- Ajax not working properly
- Having a Function Inside of the Loop
- Removing custom meta data
- Passing User_Fields to Contact form 7 [duplicate]
- Is There Any Built In WP Functionality For Combining Form Fields To Return Specific Data
- wp_nonce_field is breaking form for reasons unknown
- How to properly refresh page after form action?
- Init action and refresh page after form action
- dynamic enquiry form [closed]
- This code is supposed to only allow user to be authenticated if accountVerified is equal to 1, but it still allows user to be authenticated otherwise
- Problems adding a new field to product in cart
- Postback redirect through add_action is not triggered
- Button click counter for login user
- How to change form action of wp-login page with a function
- WordPress Ajaxifying not working properly
- Sending Messages Back to the Template After Processing?
- us states dropdown function and echo in theme template files
- Adding custom field in menu options [duplicate]
- Gravity Forms After Submission – GFFormsModel::update_lead_field_value?
- Send foreach $_post method to contact form 7 [closed]
- Will my WordPress site become vulnerable after adding this functions which allows more HTML tags for subscribers?
- Help finishing script to export WP user data when form submitted
- Directing to functions.php the correct way
- Contact form with dynamic dropdown and filter
- WordPress Custom wp mail template return full template
- Get all users from role and add to dropdown (select) – wordpress, javascript
- Can’t find function which is called in a wordpress theme
- How to customize the_archive_title()?
- Displaying the number of updates available in the Admin area
- Trying to use add_action and do_action with parameters
- Safe to disable wptexturize?
- Get a list of all available fields in the User Profile
- How do I use the WP image functions in a page template?
- Insert Ad Code in the Middle of a Post
- Add options to featured image
- WordPress Change Post Templates,but not drop down, but Image selection
- Programmatically Add Font-Awesome Icons to Category Widget
- Remove “says” from comments
- Reuse variable in hook callback
- Dynamically Register Sidebars For Each Top Level Page
- Run Product Filter Javascript On Page Template
- Can you use admin pages functionality on the frontend of your site
- How to add a column to the Trash page?
- Overwrite Parent Theme add_image_size in Child Theme
- Custom registration URL lost when user makes signup mistake
- Images uploaded using media uploader are appearing upside down
- jQuery Plugin to use WordPress functions in AJAX request
- Individually styling date month year [closed]
- Tiny MCE-modifications (plugins) stopped working in WordPress 5.6
- Writing functions in WordPress functions.php that don’t replace a WordPress core function
- How to hook into a function offered by a plugin?
- Change position of media in admin menu
- How can I remove the main description text box in a Woocommerce product editor page? I only use the “Product short description” text box [closed]
- show first 3 thumbnails of posts in different sizes [closed]
- Getting custom image size URL in functions
- new_excerpt_more link not working properly
- WordPress function saves a post twice and updates all posts
- Change CSS for logged in users
- if statement for wordpress default featured image on single post
- Function to display post by specific author
- Return category name with & Ampersand doesnt work
- Download PDF after CF7 form submission
- javascript and css links not working on sever
- is_page() or is_single not working
- What are the meta fields for an attachment?
- Adding product to WooCommerce cart [closed]
- Insert a field with PREG_REPLACE – strange behaviour
- Difference between get_userdata() and get_currentuserinfo()
- Astra theme – cannot set short product description under the product title (product name)
- Is posible to redirect a few URL?
- Run function with schedule is not working correctly
- I have defined 2 text strings, how do I use them in my posts?
- Create New User Custom Field not Saving
- Keep Admin Logged In For a Year
- Strange result of get_stylesheet_directory()
- Using a variable in name of dynamically-called helper function
- How to add function to custom fields when page/post has a password?
- custom COOKIE on custom page
- List all post title in category using functions.php
- Quicktags external functions file
- Remove Captions from Custom Gallery function.php
- Optimizing multiple WP_querys into one call?
- How do I get my nav menu to show sub pages?
- Gallery Shortcode Function Help
- How do I add e-mail subscription functionality
- reusing code in function and running it with loop
- Automatically delete posts that aren’t in an array
- Ads Only at one website inside multisite network – code error