Skip to:
Content

BuddyPress.org

Opened 10 years ago

Closed 7 years ago

#6133 closed enhancement (maybelater)

Digit limit and mask for number xprofile field

Reported by: sooskriszta's profile sooskriszta Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Extended Profile Keywords: dev-feedback, trac-tidy-2018
Cc: vivek@…

Description

Sometimes you want numbers in specific formats. e.g. phone numbers, percentiles, grades, age etc.

Admin-defined masks e.g. ###-###-#### may be a good solution.

Admin-defined digit range (say 9 to 11 digits for international phone numbers) may also be a good idea.

Attachments (1)

Number field mask.png (34.0 KB) - added by sooskriszta 10 years ago.

Download all attachments as: .zip

Change History (10)

#1 @DJPaul
10 years ago

We have considered and (I think) previously passed on the idea of phone number-style profile fields due to complications around how strict (or loose) the validation would have to be. I don't think we've seen this suggestion before; it's an interesting one.

To consider its inclusion in core, I think the suggestion would benefit from wireframes or mockups for the "add new field" screen to explore what the UI might look like.

#2 @DJPaul
10 years ago

  • Component changed from Core to XProfile
  • Milestone changed from Awaiting Review to Future Release

#3 @sooskriszta
10 years ago

Here's how I am thinking about it:

There are some reserved characters for the mask: 0, # and *

0 forced a certain number of digits by padding the number with non-significant zeroes.
# represents a digit
* represents digits (any number of digits)

Usage

Number entered: 5
Mask: 00-00
Number displayed: 00-05
Mask: ##-##
Number displayed: N.A. (Error! 4 digit entry required)
Mask: **-**
Number displayed: 5

Number entered: 5386
Mask: 000/0
Number displayed: 538/6
Mask: ###/#
Number displayed: 538/6
Mask: ***/*
Number displayed: 5386

Number entered: 6507232766
Mask: 000-000-0000
Number displayed: 650-723-2766
Mask: ###-###-####
Number displayed: 650-723-2766
Mask: *-###-####
Number displayed: 650-723-2766

Number entered: 16507232766
Mask: +0-000-000-0000
Number displayed: +1-650-723-2766
Mask: +#-###-###-####
Number displayed: +1-650-723-2766
Mask: +##-###-###-####
Number displayed: N.A. (Error! 12 digit entry required)
Mask: +*-###-###-####
Number displayed: +1-650-723-2766
Mask: +*-###-###-*
Number displayed: 16507232766
Mask: ###-###-####
Number displayed: N.A. (Error! 10 digit entry required)

Number entered: 446507232766
Mask: +*-###-###-####
Number displayed: +44-650-723-2766
Mask: +##-###-###-####
Number displayed: +44-650-723-2766
Mask: +#-###-###-####
Number displayed: N.A. (Error! 11 digit entry required)
Last edited 10 years ago by sooskriszta (previous) (diff)

#4 @sooskriszta
10 years ago

  • Cc vivek@… added

#5 @sooskriszta
10 years ago

  • Keywords dev-feedback added

@DJPaul Does the mask info and UI wireframe make sense?

This ticket was mentioned in Slack in #buddypress by djpaul. View the logs.


9 years ago

This ticket was mentioned in Slack in #buddypress by oc2ps. View the logs.


8 years ago

#8 @DJPaul
7 years ago

  • Keywords trac-tidy-2018 added

We're closing this ticket because it has not received any contribution or comments for at least two years. We have decided that it is better to close tickets that are good ideas, which have not gotten (or are unlikely to get) contributions, rather than keep things open indefinitely. This will help us share a more realistic roadmap for BuddyPress with you.

Everyone very much appreciates the time and effort that you spent sharing your idea with us. On behalf of the entire BuddyPress team, thank you.

If you feel strongly that this enhancement should still be added to BuddyPress, and you are able to contribute effort towards it, we encourage you to re-open the ticket, or start a discussion about it in our Slack channel. Please consider that time has proven that good ideas without contributions do not get built.

For more information, see https://bpdevel.wordpress.com/2018/01/21/our-awaiting-contributions-milestone-contains/
or find us on Slack, in the #buddypress channel: https://make.wordpress.org/chat/

#9 @DJPaul
7 years ago

  • Milestone Awaiting Contributions deleted
  • Resolution set to maybelater
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.