This document contains information for an outdated version (2.3) and may not be maintained any more.

If some of your projects still use this version, consider upgrading as soon as possible.

Form Field Types

This is a highlevel overview of available [apiFormField]` subclasses. An automatically generated list is available through our API

Formatted Input

Date/Time

  • DateField: Represents a date in a textfield (New Zealand)
  • DatetimeField: Combined date- and time field
  • TimeField: Represents time in a textfield (New Zealand)

Structure

  • CompositeField: Base class for all fields that contain other fields. Uses <div> in template, but doesn't necessarily have any visible styling.
  • FieldGroup: Same as CompositeField, but has default styling (indentation) attached in CMS-context.
  • FieldSet: Basic container for sequential fields, or nested fields through CompositeField. Does NOT render a <fieldgroup>.
  • TabSet
  • Tab

Actions

  • Form for more info
  • InlineFormAction: Render a button that will act as If you want to add custom behaviour, please set {inlcudeDefaultJS} to false and work with behaviour.js.
  • Image: Action that uses an image instead of a button
  • InlineFormAction: Prevents placement of a button in the CMS-button-bar.

Files

  • FileField: Simple file upload dialog.
  • FileIFrameField: File uploads through an iframe
  • Image: Image upload through an iframe, with thumbnails and file-selection from existing assets
  • SimpleImageField: SimpleImageField provides an easy way of uploading images to Image has_one relationships. Unlike ImageField, it doesn't use an iframe.

Relations

Dataless/Utility

CMS Field Editor

Please see HTMLEditorField for in-depth documentation about custom forms created through a GUI in the CMS.

Comments

Comment policy: Please use comments for tips and corrections about the described functionality.
Comments are moderated, we reserve the right to remove comments that are inappropriate or are no longer relevant. Use the Silverstripe Forum to ask questions.

blog comments powered by Disqus