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

dafeder’s picture

I 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.

kgc’s picture

I 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.

dafeder’s picture

THe 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.

szantog’s picture

A temporary solution without direct hacking the db: user form alter to set default value:

function MYMODULE_form_media_gallery_node_form_alter(&$form, &$form_state) {
  if (arg(1) == 'add') {
    $form['settings_wrapper']['presentation']['media_gallery_allow_download']['und']['#default_value'] = 0;
  }
}

This is a dirty solution without language checking, just really quickfix

SharonD214@aol.com’s picture

I'd like to unlock mine to give the option of public or private file location. Any idea how to do that?

Thanks
Sharon

sschwab’s picture

Count 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?

lsolesen’s picture

csc4’s picture

Issue summary: View changes

Has anyone come up with a good workaround for this?

Chris Charlton’s picture

I though this was already a feature?!

ivnish’s picture

Status: Active » Closed (outdated)