BizForms API and internals |
Database structure
Each BizForm has its own database table. You can find its name in the BizForm Properties dialog. This table contains all fields that you specified. You can modify the data using direct access to the database table (there are no dependencies).
Custom Field Controls
You can create your own field controls as described in chapter Form controls. If you want to make them available in the BizForms field editor, you need to check the box Show control in BizForms in the Form control properties dialog (Site Manager -> Development -> Form controls) and choose the default data type.
Event Handling
You can run custom actions when a BizForm form is submitted and a record is created, updated or deleted. There are two ways how you can handle the data changes:
1. Handling the BizForm control events
In this case, you place the BizForm control on a user control or web part and specify the FormName property to the code name of the required BizForm. Then, you can handle the BizForm events, such as OnAfterSave, OnBeforeValidate, etc.
In these handlers, you can access form values using the BizForm.BasicForm.DataRow property and stop further processing (saving) of the form using the BizForm.StopProcessing property. Particular fields, labels and validation error messages can be accessed using properties BizForm.BasicForm.FieldControls, BizForm.BasicForm.FieldLabels and BizForm.BasicForm.FieldErrorLabels.
2. Handling global data events
You can write a custom data handler as described in chapter Data handler (CustomDataHandler class). Such a handler will allow you to run custom code whenever a database record is inserted, updated or deleted. You can use the dataItem.ClassName property to check if the record being updated is your BizForm code name (you can find the Form code name in the BizForm Properties dialog).
Managing data using API
The following examples show you how to create, updated and delete form data using .NET code:
Creating a new record
[C#]
Updating a record
[C#]
Deleting a record
[C#]
|