Skip to content
Nathan Cox edited this page Sep 9, 2013 · 4 revisions

This field is intended to make any combination of text fields and labels on a single line in the CMS.

The differences from FieldGroup are a) it takes away the minimum width of fields so things are spaced approriately; and b) if you pass in a string instead of a field it's automatically turned in to a LiteralField

No dramatic functionality, just a convenience class for formatting.

Currently being developed on SilverStripe 3, not tested on 2.x yet.

Example Usage

$fields->addFieldToTab('Root.Main', new TextFieldGroup('Map coordinates',
		$this->getMapLink() . '/',
		new NumericField("LocationX", "", "", 3),
		new NumericField("LocationY", "", "", 3)

TextFieldGroup example 1

$fields->addFieldToTab('Root.Main', new TextFieldGroup('Subdomain',
		new TextField("Subdomain", ""),

TextFieldGroup example 2

Clone this wiki locally
You can’t perform that action at this time.