Changes between Version 6 and Version 7 of S3/S3SQLForm


Ignore:
Timestamp:
02/21/13 09:26:40 (9 years ago)
Author:
Dominic König
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • S3/S3SQLForm

    v6 v7  
    139139
    140140Where multiple sub-forms for the same component (but with different filters) shall be embedded, they must each have a distinct "name" argument. Otherwise this argument is optional.
     141
     142=== Sorting of Inline-Components ====
     143
     144It is possible to sort the inline-items by specifying an {{{orderby}}} option:
     145
     146{{{
     147    s3forms.S3SQLInlineComponent(
     148        "location",
     149        label = T("Countries"),
     150        fields = ["location_id"],
     151        orderby = "location_id$name"
     152    ),
     153}}}
     154
     155To specify the sort order, the {{{orderby}}}-option also accepts a tuple like: {{{("location_id$name", "desc")}}}.
     156
     157    '''Note:''' the field selector used in orderby must give exactly one value per row (i.e. use only forward-links, not component fields or list:types), otherwise the same component item would appear multiple times in the form (due to the left join involved).
    141158== Current Status ==
    142159