Skip to:
Content

Opened 11 months ago

Last modified 3 months ago

#5500 new enhancement

Date xprofile field enhancement

Reported by: sooskriszta Owned by:
Milestone: Future Release Priority: normal
Severity: normal Version:
Component: Component - XProfile Keywords: dev-feedback
Cc: vivek@…

Description

I can't claim that this will useful for all or most communities. I do believe that many communities, especially "social networking"-type communities will find it valuable.

This could be formed by 3 dropdowns: one each for date, month and year. The sequence of the dropdowns should be dictated by the date format selected by admin in WordPress settings.

There should be 2 mutually exclusive options (checkboxes):

  • Show year in public profile (unchecked by default) - so by default the public profile shows only date and month.
  • Show age instead of date of birth (unchecked by default) - overrides previous option..if checked the profile shows calculated age in years (today - dob), instead of the date of birth

The admin should also have the right to limit registration/profile access by age. e.g. A checkbox and a textbox in admin panel
Only allow members over years of age (unchecked by default)
In frontend, the dropdowns only list dates that would make the member's age over the admin-specified minimum age. If admin has not selected any minimum, then the member's age should be at least 0 days.

Standard validation rules for dates apply.

Attachments (1)

enhanced-date-field.png (78.6 KB) - added by sooskriszta 9 months ago.
Suggested "enhanced" date xprofile field UI wireframe

Download all attachments as: .zip

Change History (15)

comment:1 @boonebgorges11 months ago

Thanks for the detailed request.

IMO, this is too specific for a field *type*. Date of Birth might be of interest to many communities, but the underlying logic - a field that allows for date input, and can display it in a number of different ways - could be used for many other purposes.

So, I'm going to propose that instead, we use this ticket to discuss ways of improving our existing Date field. I can imagine adding the following:

  • Show "time elapsed" instead of the date. This would be roughly equivalent to the "Age" feature requested above. So you'd enter "September 4, 1934" and the display value would be, say, "80 years ago"
  • Options for which dates to show. Past only, present only, specific year ranges
  • Time + date

The stuff about restricting site membership based on age/DOB does sound useful, but I think it's pretty straightforwardly plugin territory. On the bright side, if we built an enhanced Date field type, extending this to cover Age more specifically would be extremely easy.

What do you think?

comment:2 @sooskriszta11 months ago

Your note makes perfect sense to me.

We should build in the "privacy" filter - don't show year - if possible, though.

Last edited 11 months ago by sooskriszta (previous) (diff)

comment:3 @sooskriszta11 months ago

  • Cc vivek@… added

comment:4 @sooskriszta11 months ago

  • Summary changed from Custom xprofile field: Date of birth to Date xprofile field enhancement

comment:5 @DJPaul10 months ago

  • Milestone changed from Awaiting Review to Future Release

comment:6 @DJPaul10 months ago

My gut feeling is many simple fields will be a better/less complicated UI than just a few field types with various options to configure behaviour (I imagine power users would appreciate the fine-grained control, but we're trying to build for the 80%).

comment:7 @boonebgorges10 months ago

I agree with that idea in general, but I think that a simple toggle for setting beginning and ending dates for the date field might be an exception. It's hard to think of a use case for the date field where these settings *wouldn't* be useful. That said, I'm willing to listen to the wisdom of the crowds on this point.

comment:8 @DJPaul9 months ago

See also #5646

We should agree how we want to approach this sooner rather than later, because we've had tickets from multiple people for each approach.

comment:9 @sooskriszta9 months ago

I am convinced that DOB is too specific.

Let every date field have 3 additional features:

  • Show year (On by Default). If admin switches this off, then in the public front-end only date and month are shown, e.g. 1 January
  • Dates to list: year x to year y, or from x years before today to y years before today (accept negative values for x and y to allow for future dates)
  • Show time elapsed i.e. Today - Date. I differ from Boone on the language used though. I'd say simply 80 years, not 80 years ago. Here's why: Showing age: 37 years makes more sense than 37 years ago Showing countdown: If Today - Date is negative, i.e. we are counting down to an even in the future (say birthday party) then we don't want to grapple with a separate text string...we just want to say 15 days

comment:10 @boonebgorges9 months ago

sooskriszta - Thanks for the feedback. But the UI you're suggesting here, as I'm envisioning it, would be several times more complex than what I think we're leaning toward. Those three additional features will translate into four or five different settings of different types. Any chance you might want to mock up how you imagine the interface looking?

The options laid out by sooskriszta are helpful in that they show all the different ways that date fields might be used. It's pushing me more in the direction of DJPaul's position that we should probably just have separate field types. That said, I do think that (eg) a DOB field still should have some settings; some sites will want to set the earliest date to be 12 years ago, while others may want it to be 21 years ago, etc. I also think there's some merit to having the option for a DOB field to display as age.

Would it maybe be helpful if we came up with three or four examples of how date fields might be used. That would help us to get a sense of where the use cases intersect, and what if anything would go into a general "Date" field in terms of settings/UI.

@sooskriszta9 months ago

Suggested "enhanced" date xprofile field UI wireframe

comment:11 @sooskriszta8 months ago

  • Keywords dev-feedback added

comment:12 @ircbot7 months ago

This ticket was mentioned in IRC in #buddypress-dev by OC2PS. View the logs.

comment:13 @boonebgorges3 months ago

#6038 was marked as a duplicate.

comment:14 @slackbot3 months ago

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

Note: See TracTickets for help on using tickets.