Changes between Version 54 and Version 55 of S3/S3REST/s3_rest_controller
- Timestamp:
- 01/27/11 22:28:58 (13 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
S3/S3REST/s3_rest_controller
v54 v55 318 318 3. values provided by the controller 319 319 320 Model defaultsare defined per field and can be set as {{{db.my_table.field.default = value}}} at any time before the REST method is applied (even in the pre-process).321 322 Values from another recordin the database can be used via a URL query like:320 '''Model defaults''' are defined per field and can be set as {{{db.my_table.field.default = value}}} at any time before the REST method is applied (even in the pre-process). 321 322 '''Values from another record''' in the database can be used via a URL query like: 323 323 324 324 - /my/resource/create?from_record=''id''&from_fields=''fieldname1'',''fieldname2'',... … … 326 326 The ''id'' of the original record can also be specified as ''tablename.id'', if the original record is in another table. Additionally, fieldnames can be specified as ''fieldname$original_fieldname'' to map between different fieldnames. 327 327 328 To pre-populate Create-forms from the controller, you can specify the variable {{{populate}}} in the arguments of {{{s3_rest_controller}}}:328 To '''pre-populate''' Create-forms '''from the controller''', you can specify the variable {{{populate}}} in the arguments of {{{s3_rest_controller}}}: 329 329 330 330 {{{