I don't know if filefield is even remotely heading in this direction, but I thought I'd share this patch in case anyone else needs it.

Emvideo has several hooks to alter the field and widget, and I think that functionality would be very helpful in filefield. The alternative is to create a new widget or field based on filefield, but that can be overkill.

In my case, I just wanted to add a couple of user defined variables to the $data serialized array.

CommentFileSizeAuthor
filefield_alter_widget.patch901 bytesraspberryman

Comments

drewish’s picture

Status: Active » Needs work

indenting seems a bit off and we should really document the hooks. imagecache has an imagecache.api.php that mirror's D7's core setup.

quicksketch’s picture

Category: feature » support
Status: Needs work » Fixed

This hook is not necessary, you can already accomplish the exact same thing with hook_elements() provided by Drupal core. See the FileField Sources module for an example of how to do this in action.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.