When a field is hidden, its data disappears from the node structure. This means that a hidden field can not be used with things like contemplates or, more importantly, the token module.

Comments

yched’s picture

Why do you set fields as hidden if you want to display them in your templates ?

About token : right, this is more problematic.
Talking with Eaton on IRC we mentioned the possibility to let modules add their own 'contexts' (value for $node->build_mode) in the 'Display fields' pages. This would be useful for modules such as nodeasblock - I'm thinking this might also solve the problem with tokens :
you select which formatters you to use when generating the tokens.

greggles’s picture

Well, there's #172127: CCK Pathauto Tokens won't work if field is <Hidden> and perhaps more importantly there's #153561: other modules cannot access <hidden> CCK fields which has discussed this some more.

@yched, your idea in #1 seems reasonable to me to have other contexts. I can also see the utility in hiding this from the admin and just doing a default "show everything" mode that is available in the API which token could use. That has the drawback of not allowing the admin to specify which formatter should be used but the benefit of being much simpler.

yched’s picture

Status: Active » Closed (duplicate)