Home › Forums › General Issues › Number Field formatting (placing commas) › Reply To: Number Field formatting (placing commas)
Update:
Above code worked like so:
add_filter('acf/format_value/name=listing_price', 'fix_number', 10, 3);
function fix_number($value, $post_id, $field) {
$value = number_format($value);
return $value;
}
I can now see the correct comma separators for new entries that I place in the number field.
Any suggestion as to how I can ‘correct’ previous entries as well?
Otherwise, I have to manually adjust more than 100 different entries/listings!!
THanks for any suggestions.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.