When sending a new private message both the subject and body fields are required (ref _privatemsg_validate_message()), but these are not marked with a red star. The user is now only informed that these fields are required *after* submitting the form, which is not very nice :)

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Berdir’s picture

The thing is that only *one* of these fields is required, you can either provide a subject or a body ( in which case the subject will automatically be set to the first characters of the body).

The result of this is that we can't rely on the default #required functionality of Drupal...

pfrenssen’s picture

Status: Active » Needs review
FileSize
1.23 KB
pfrenssen’s picture

Status: Needs review » Active

Woops cross-posted.

pfrenssen’s picture

Issue tags: +Needs usability review

Ok how can this be solved in a user friendly way? Not indicating anything is just wrong IMO.

A common way to do this is to make the body required, and use the first X characters of the body as a subject line if this has been omitted. This is how many comment forms work (including Drupal core). The downside is that the first line of a message is usually not the best summary (as it often is a variation on "Hey baby how are you?" :)

What about a setting for the subject line: hidden / optional / required ?

Edit: a common usage scenario in email clients is to warn the user if no subject line has been given, and if the user confirms to replace the subject line with something along the lines of "<no subject>".

Berdir’s picture

Not sure.

I mean, it's pretty uncommon to try and send message without providing at least a subject *or* a body.

And as I'm trying to keep my stable branches as stable as possible (meaning, no ui/text/api changes), anything that actually adds features like a setting or making the body required could only be done in 7.x-2.x

ptmkenny’s picture

Title: Subject and body fields are required but are not marked as such » Mark subject/body fields as required
Version: 7.x-1.x-dev » 7.x-2.x-dev
Category: bug » feature
yoroy’s picture

Issue summary: View changes
Issue tags: -Needs usability review +Usability

It's true that if something is required it would have to be indicated.

Would be interesting to find out how people use this. I personally find a title for a (quick) message overly formal and cumbersome. Chat clients don't do it. SMS messages, tweets are basically 1 text area.

Comments on groups.drupal.org can be titled as well but if you don't, then the first x characters of the body are used for a title. Doesn't really apply here because only one of the two is needed here, but it suggests that the body is more required than a title.

Or just look at the name of this module. It's called Privatemsg, not Privatetitle right? :-)

ivnish’s picture

Status: Active » Closed (outdated)
andypost’s picture

Status: Closed (outdated) » Active

D7 is not yet outdated