Limiting Forms

From IHRIS Wiki
Revision as of 08:21, 20 March 2009 by Litlfred (talk | contribs) (New page: In version 3.2 and greater we have unified the ability to search for forms by limiting the values of their fields. This is used in, for example: *I2CE_Form::search() *I2CE_Form::listField...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

In version 3.2 and greater we have unified the ability to search for forms by limiting the values of their fields. This is used in, for example:

  • I2CE_Form::search()
  • I2CE_Form::listFields()
  • Form Relationships
  • Report Limits

Limit Styles

There are many ways that you may wish to limit the values of a particular field, we refer to these as a limit style. Recall that every field is has a type, such as INT or INT_LIST, which translates to a class, such as I2CE_FormField_INT or I2CE_FormField_INT_LIST, all of which sub-class I2CE_FormField. A type is made available to some sub-class (as well as well of all of its sub-classes) of I2CE_FormField.

Most of these limit style, and their attendant code, can be found in the module form-limits.

Existing Styles

  • I2CE_FormField
    • null
    • not_null
    • max_parent
    • min_parent
    • max_parent_form
    • min_parent_form
  • I2CE_FormField_BOOL
    • truefalse
    • true
    • false
  • I2CE_FormField_DB_DATE
    • greaterthan_now
    • lessthan_now
  • I2CE_FormField_DB_INT
    • between
    • equals
    • in
    • greaterthan
    • greaterthan_equals
    • lessthan
    • lessthan_equals
  • I2CE_FormField_DB_STRING
    • between
    • equals
    • in
    • greaterthan
    • greaterthan_equals
    • lessthan
    • lessthan_equals
    • like
  • I2CE_FormField_DB_TEXT
    • between
    • equals
    • in
    • greaterthan
    • greaterthan_equals
    • lessthan
    • lessthan_equals
    • like
  • I2CE_FormField_YESNO
    • yesno
    • yes
    • no