Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
At the moment the gallery content type's fields are locked, I'm sure for a very good reason. This means, however, that the default values for them can not be changed.
For example, I want to make it so that by default media in a gallery does not have a download link. So I want the field 'media_gallery_allow_download' to default to 0. I was able to do this by editing the 'field_config' database table by hand, however this is obviously not the preferred method.
If we are able to unlock the fields of the content type editing default values is easy. If not, some other method would be grand.
Comments
Comment #1
dafederI would also like the option to set the defaults, and in addition to prevent those fields from appearing on the node add form as well. On my site - and, I'd bet, most using this module - I want all my gallery nodes to have the same number of nodes and columns. I have a hunch this is already planned functionality, I'd like to hear from the maintainers on this issue before thinking about submitting a patch.
Comment #2
kgc CreditAttribution: kgc commentedI have the same problem.
@Cogito: Can you say, how i can edit the data-field (longblob) in the 'field_config' database table.
Thanks for your Help.
Comment #3
dafederTHe more I think about it, the more I think that the gallery setup should be site-wide, or at least collection-wide so that there is some flexibility once multiple colletions are available.
Comment #4
szantog CreditAttribution: szantog commentedA temporary solution without direct hacking the db: user form alter to set default value:
This is a dirty solution without language checking, just really quickfix
Comment #5
SharonD214@aol.com CreditAttribution: SharonD214@aol.com commentedI'd like to unlock mine to give the option of public or private file location. Any idea how to do that?
Thanks
Sharon
Comment #6
sschwab CreditAttribution: sschwab commentedCount me in too. All I want to do is hide some of the fields for certain users when they create new galleries. The easy way is to use content access but the fields are locked. Is there an easier way to modify these forms other than overrides?
Comment #7
lsolesen CreditAttribution: lsolesen commentedThis is somewhat related to #1329358: Configurable defaults and access policies for gallery settings
Comment #8
csc4 CreditAttribution: csc4 commentedHas anyone come up with a good workaround for this?
Comment #9
Chris CharltonI though this was already a feature?!
Comment #10
ivnish CreditAttribution: ivnish commented