Hidden fields galore.

D8 Field Hidden defines hidden field widgets

<input type="hidden" /> element widgets for these core field types:

  • decimal, float, integer
  • (plain)text, (plain)long text

Hidden in forms

  • add an ordinary numeric or (plain)text field to a content/entity type
  • go to the content/entity type's 'Manage form display' section
  • select the 'Hidden field' widget for the field
    - not the '- Hidden -' widget (which excludes the field entirely from forms)

Optionally hidden in content

  • (like any other field) go to the content/entity type's 'Manage display' section
  • select the '- Hidden -' format for the field


D7 Field Hidden defines hidden field types

  • (plain)text, (plain)long text
  • integer, decimal, floating-point

Hidden in forms

Hidden fields are always rendered as <input type="hidden" /> elements in forms.

Optionally displayed in content

The value of a Field Hidden field defaults to be hidden in content - as in not rendered at all.
It may however be displayed in content, if another format than <Hidden> is selected in the content type's 'Manage Display' section.
The numeric types have exactly the same formatting options as ordinary numeric fields (the Number field module, e.g. prefix, suffix, thousand marker, decimal marker).

Validation and escaping

The values of all the field types are being validated and escaped according to coding standards, or stricter.
None of the text types allow for HTML/PHP input (nor output).
The only difference between text and long text is the database data type used - varchar versus text.

Tokens, Entity API, Migrate and Feeds integration

Makes Field Hidden fields usable in conjunction with Pathauto patterns, Rules, etc.


Similar modules

Project Information

Downloads