Closed (fixed)
Project:
FileField
Version:
6.x-3.x-dev
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
28 May 2009 at 23:16 UTC
Updated:
12 Jun 2009 at 07:20 UTC
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.
| Comment | File | Size | Author |
|---|---|---|---|
| filefield_alter_widget.patch | 901 bytes | raspberryman |
Comments
Comment #1
drewish commentedindenting seems a bit off and we should really document the hooks. imagecache has an imagecache.api.php that mirror's D7's core setup.
Comment #2
quicksketchThis 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.