Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Format number fields during mapping #1575

Closed
tibbis opened this issue Jan 17, 2025 · 2 comments
Closed

Format number fields during mapping #1575

tibbis opened this issue Jan 17, 2025 · 2 comments
Labels

Comments

@tibbis
Copy link

tibbis commented Jan 17, 2025

Description

When a text value is mapped to a number field, e.g. 100 USD, the 'USD' is still kept in the number field in the entry. Then if you save the entry it will give you an error that you cant save because the field contains letters.

I suggest adding a simple |number_format() filter to the mapping step for number fields to automatically format the value. or maybe add a formatting option in plugin feed settings.

Steps to reproduce

  1. Create number field in an entry type
  2. Map a text value to the number field
  3. run feed
  4. go to entry and save

Additional info

  • Craft version: 5.5
@brandonkelly
Copy link
Member

Thanks for reporting that! Number fields have been updated to support semi-numeric values such as 100 USD for the next Craft 4 and 5 releases, which should go out tomorrow.

@brandonkelly
Copy link
Member

Craft 4.14.6 and 5.6.7 are out with that fix. Thanks again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants