Is there any way to may the description a required field?

I ask because it would be great to organize and display my documents based on a title or description but I can't do that without requiring that field (I'm sure people would leave it blank half the time). I thought about creating an additional field for the description and making it required through cck but then I can't have more than one file per node.

If there is no way to do this then perhaps I should turn this into a feature request.

Thanks!

Comments

quicksketch’s picture

Category: support » feature

There is no way to do this currently other than some code in a custom module. There's a similar request (but also not currently an option) for ImageField: #347070: Ability to make alt and title text required for each image. I think if we start expanding the options for description it'll likely need to go into it's own fieldset (a shame that description was ever put where it currently is). I'll move this to a feature request.

quicksketch’s picture

Project: FileField » ImageField Extended
Version: 6.x-3.0 » 6.x-4.x-dev

Considering this functionality is not in Drupal core for Drupal 7, having a 3rd-party module provide this functionality is the best approach to assure a safe upgrade in the future. I'm moving this into ImageField Extended (apologies for doing this twice in a day), to see if the maintainer is interested in providing such functionality.

Alan D.’s picture

Yep. All good except that I'm now on an extended world trip and will have none / limited access to the internet and resources for at least the next month. Potentially will be doing some remote work in 2 months time (15% chance) so I would have a chance to look then.

Patches and co-maintiners welcome!

Alan D.’s picture

PS: From memory, try using the IF Extended additional fields, then you can set the required field on these :)

Alan D.’s picture

Status: Active » Closed (fixed)

Marking as closed. Follow #879512: List of feature requests - UX improvements. for a better UI.

Eg:

Disable description on ImageField
Create the new "global" description field using a key like desc using the settings under site configuration
Enable the new "global" field on the content types that you want it enabled on

With some coding, you could copy all of the existing description fields to the new field, but without this, all existing description data would be non-accessible by the new field. This process will not lose data from the database UNTIL a node is edited. At this point, given that the description field doesn't exist, the saved database version of the old description text will be lost.