Skip to content

[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 image URL, 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 from Number β†’ Text.
    • Why? ACF will strip out non-numeric characters in Number type, breaking formatting or international numbers.

βœ… 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.