marketo/silverstripe-textfieldtrimmer

This package is abandoned and no longer maintained. No replacement package was suggested.

Add this SilverStripe extension to any DataObject to automatically trim() every text (ie, HTMLText, Text, VarChar) field before data is saved to the database.

Installs: 3 238

Dependents: 0

Suggesters: 0

Security: 0

Stars: 3

Watchers: 25

Forks: 1

Open Issues: 0

Type:silverstripe-module

dev-master 2016-02-22 18:07 UTC

This package is not auto-updated.

Last update: 2024-03-15 17:17:17 UTC


README

Description

Add this SilverStripe extension to any DataObject to automatically trim() every text (ie, HTMLText, Text, VarChar) field before data is saved to the database.

#Installation

  1. copy the 'textfieldtrimmer' folder to the document root
  2. rebuild the manifest using /dev/build/?flush=all
  3. in the project code: on any DataObject that needs text fields trimmed, indicate that the DataObject is an 'extension' of TextFieldTrimmer, for example:
class Category extends DataObject {

	static $extensions = array(
		'TextFieldTrimmer',
	);
    ...
}