[09:49 AM EST]
Based on the screenshots you shared, here’s a breakdown of the ACF fields you just added and what they do:
π§© 1. UserPhoneNumber
π Purpose: Stores the user’s phone number.
Details:
- Field Label:
UserPhoneNumber - Field Name:
userphonenumber - Field Type:
Number
β€ This restricts the input to numeric values only (not ideal for phone numbers with+,(), or-symbols). - Location Rule:
User Form is equal to All
β€ This means the phone number field will show up on all user profile pages (admin edit and front-end if applicable).
β
Effect: This field is available when editing a userβs profile and will be saved with the user meta under the key userphonenumber.
πΌοΈ 2. userimage
π Purpose: Stores a user profile image (avatar-like).
Details:
- Field Label:
userimage - Field Name:
userimage - Field Type:
Image - Return Format:
Image Array
β€ This gives you access to imageURL,ID,alt text,sizes, etc. - Library:
All
β€ User can pick from any media in the media library.
β
Effect: Allows assigning an image to a user (can be used for avatars, directory displays, etc.) and stores it in user meta as userimage.
π₯ Recommendations
β οΈ userphonenumber Field Type
- Since phone numbers can contain characters like
+1,-,(), and spaces, change the Field Type fromNumberβText.- Why? ACF will strip out non-numeric characters in
Numbertype, breaking formatting or international numbers.
- Why? ACF will strip out non-numeric characters in
β Better: Use βTextβ with Validation
- Use field type:
Text - Then add a pattern like:
^[0-9-+()s]{7,20}$
in the Validation > Custom Pattern if you want formatting validation.
