marketo / silverstripe-textfieldtrimmer
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
Requires
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
- copy the 'textfieldtrimmer' folder to the document root
- rebuild the manifest using /dev/build/?flush=all
- 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', ); ... }