wiki:FormReview

Form Fields Revision

We need people to review form fields in the following areas:

Areas that need to be reviewed:

  • general status: obsolete? redundant? to be moved to CMS? to be moved to other module?
  • does the form field work in a front-end form?
  • does the form fieldwork in a CMS form?
  • does the form field's html validate?
  • does the form field's PHP comply with coding standards?
  • does the form field's PHP validation work (see note about JS validation)?
  • are there any test that specifically test this class?
  • is there sufficient inline documentation

Notes

  • JS Validation will be largely deprecated in favour of ajax validation and jquery.validate library, so doesn't need review
  • PHP Validation shouldn't necessarily fail if the field is empty,.that is not consistent behaviour at the moment. The evaluation has to be contained with the field to enable ajax-validation, but should be explicit.
  • Perhaps a $required flag and an isRequired() getter thats triggered by the current RequiredFields??
  • Before refactoring validation, we have to think about how to easily make it localizeable (e.g. dates, currencies, ...)
  • formfields are categorized on here  http://doc.silverstripe.com/doku.php?id=form-field-types
  • Categorizing into subfolders could help understanding the uses of different files in that tree (forms/transformations, forms/validation, forms/datetime, ...), but due to subversion shortcoming it'll be a pain to merge and changes to and from the copied files

How to review

  • Choose a class from the list below.
  • Download it using the latest version in trunk,
  • change entry on this page to "under review", including your name and email address
  • keep notes about your review in the form field's wiki page
  • post any recommended changes to trac
  • change status to "done" - once completed

Classes for review

General/Other?

Editable Stuff

Structure and Other