Changes between Version 14 and Version 15 of S3/S3SQLForm
- Timestamp:
- 06/13/14 12:18:41 (11 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
S3/S3SQLForm
v14 v15 9 9 10 10 Example: 11 {{{ 11 {{{#!python 12 12 def inline(): 13 13 … … 56 56 Regular fields in the main table can be specified simply by their field name. 57 57 58 {{{ 58 {{{#!python 59 59 crud_form = S3SQLCustomForm( 60 60 "first_name", … … 71 71 Fields in components which are set to multiple=False (single-record components = sub-tables) can also be specified as field selector strings using the "."-notation: 72 72 73 {{{ 73 {{{#!python 74 74 crud_form = S3SQLCustomForm( 75 75 "identification.status" … … 87 87 Components with multiple=True (multi-record components) can be specified as instances of S3SQLInlineComponent: 88 88 89 {{{ 89 {{{#!python 90 90 crud_form = S3SQLCustomForm( 91 91 S3SQLInlineComponent( … … 117 117 To filter an inline component by e.g. type, you can a {{{filterby}}} option like in: 118 118 119 {{{ 119 {{{#!python 120 120 S3SQLInlineComponent( 121 121 "contact", … … 143 143 144 144 It is possible to sort the inline-items by specifying an {{{orderby}}} option with a field selector relative to the component table: 145 {{{ 145 {{{#!python 146 146 s3forms.S3SQLInlineComponent( 147 147 "location", … … 153 153 154 154 To specify a different sort order, the {{{orderby}}}-option also accepts a tuple like: 155 {{{ 155 {{{#!python 156 156 s3forms.S3SQLInlineComponent( 157 157 "location",