Package s3 :: Module s3forms :: Class S3SQLCustomForm
[frames] | no frames]

Class S3SQLCustomForm

source code

object --+    
         |    
 S3SQLForm --+
             |
            S3SQLCustomForm

Custom SQL Form

Instance Methods
 
insert(S, index, object)
insert object before index
source code
 
append(S, object)
append object to the end of the sequence
source code
 
__call__(self, request=None, resource=None, record_id=None, readonly=False, message="Record created/updated", format=None, **options)
Render/process the form.
source code
 
validate(self, form)
Run the onvalidation callbacks for the master table and all subtables in the form, and store any errors in the form.
source code
 
accept(self, form, format=None, link=None, hierarchy=None, undelete=False)
Create/update all records from the form.
source code

Inherited from S3SQLForm: __init__, __len__

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties

Inherited from object: __class__

Method Details

insert(S, index, object)

source code 

insert object before index

append(S, object)

source code 

append object to the end of the sequence

__call__(self, request=None, resource=None, record_id=None, readonly=False, message="Record created/updated", format=None, **options)
(Call operator)

source code 

Render/process the form.

Parameters:
  • request - the S3Request
  • resource - the target S3Resource
  • record_id - the record ID
  • readonly - render the form read-only
  • message - message upon successful form submission
  • format - data format extension (for audit)
  • options - keyword options for the form
Returns:
a FORM instance
Overrides: S3SQLForm.__call__

validate(self, form)

source code 

Run the onvalidation callbacks for the master table and all subtables in the form, and store any errors in the form.

Parameters:
  • form - the form

accept(self, form, format=None, link=None, hierarchy=None, undelete=False)

source code 

Create/update all records from the form.

Parameters:
  • form - the form
  • format - data format extension (for audit)
  • link - resource.link for linktable components
  • hierarchy - the data for the hierarchy link to create
  • undelete - reinstate a previously deleted record