Closed (fixed)
Project:
FileField
Version:
6.x-3.1
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
3 Oct 2009 at 09:13 UTC
Updated:
24 Apr 2010 at 02:05 UTC
I know I am able to hide the filefield from the form using Content Access. But what about if I just want to dissallow them to Edit filefield?
I want my user to be able to Create and Upload a file. But when editing, I want to hide the Filefield (upload form), and only allow them to change Title, descriptions and other text field.
Is there already a plugins, patch or even module available out there?
Thanks.
Comments
Comment #1
quicksketchI do not think there are any plugins/patches/modules that do what you want. I'd suggest you write a custom module and use hook_form_alter() to hide the FileField when the node is being edited.
Comment #2
sadist commentedHi quicksketch, thanks for your reply. Sorry for not responding earlier as I was busy with other projects.
I'd tried your method but it doesn't work. Let's say, I create my own custom 'video' module. This module will create a content-type, and I create the video filefield manually.
So I place this in my video.module:
But it doesn't work, I or other normal user will still be able to see the filefield when editing their video node.
Comment #3
sadist commentedJust to share with the rest who might need this. I managed to hide it when editing node using the function below in my custom video module:
However, I'd tried alot of methods for me to disable the fieldset collapsible. Right now, it is at expand state, but i don't want it to be collapsible at all. I even want to remove the fieldset title.
Anyone can help me with this? Thanks.
Comment #4
quicksketchI'm glad you got the basics working, however support for writing custom code is generally not provided in the FileField queue. As such I'm closing this issue.