Changes between Version 1 and Version 2 of IS_ONE_OF


Ignore:
Timestamp:
08/23/09 12:58:57 (12 years ago)
Author:
Dominic König
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • IS_ONE_OF

    v1 v2  
    11= IS_ONE_OF Validator =
    22
    3 The IS_ONE_OF() validator is a custom version of web2py's IS_IN_DB() for foreign key lookups in a key table. Other than IS_IN_DB, the IS_ONE_OF validator is deletion status sensitive, i.e. records in the key table that are flagged as 'deleted' will be ignored.
     3The IS_ONE_OF() validator is a custom version of web2py's IS_IN_DB() for foreign key lookups in a key table. In forms, the respective field will be rendered as a drop-down field.
    44
    5 Furthermore, it is possible to filter the key records by a type field (which should be int) for certain options
     5Other than IS_IN_DB, the IS_ONE_OF validator is deletion status sensitive, i.e. records in the key table that are flagged as 'deleted' will be ignored. Furthermore, it is possible to filter the key records by a type field (which should be int) for certain options.
    66
    77Usage:
     
    1717  - filter_opts=''"options"'' = a list or tuple of allowed values for the filterby-field
    1818
    19   If filterby is specified, the drop-down fields get sorted by this field.
     19  Note:
     20    - Without represent and if no 'name' field can be detected in the table, the keyfield itself will be used as option label.
     21    - If filterby is specified, the drop-down fields get sorted by this field.
    2022
    2123Example: