The API has slightly changed in version 7.0. How to get on-line form data is described in in the article:
Modifying the code of standard web parts.
The direct uploader field and its value is a little different and you can use the below API to work with this field.
void viewBiz_OnBeforeSave(object sender, EventArgs e)
{
// Find uploader in bizform.
FormEngineUserControl control = (FormEngineUserControl)viewBiz.BasicForm.FieldControls["attachmetField"];
if (control != null){
Uploader uploader = (Uploader)control.FindControl(control.InputControlID);
}
}
-it-
This is a general .NET issue/behavior pattern. If you set the TextBox control TextMode to Password, .NET will automatically discard your value. You either need to change the TextMode to e.g. SingleLine, meaning the password will be displayed in plain text, or you can add the following line of code to the Page_Load method in the code behind file of the given form control.
<textbox_name>.Attributes["value"] = <textbox_name>.Text;
For example, if you wish to change the
Password form control, you need to modify the file
~\CMSModules\Membership\FormControls\Passwords\Password.ascx.cs by adding the following line at the beginning of the Page_Load method:
txtPassword.Attributes["value"] = txtPassword.Text;
-bp-
Please check if the
ID column is on the
first place (the top position) in the Fields section of BizForm settings. Unless so, please move it up to make it work.
-hg-
Kentico CMS is using ‘|’ to separate multiple choices. That means, if you have for example a quiz like form, with the correct answers 1 and 3, defined for example as 1;True 2;False 3;True you need to use the regular expression [1][|][3]. You don’t need to use at the start the combination ‘^(‘ and at end the combination ’)$’ - they are inserted automatically.
If you use BizForm as an inline control, you can adjust its code-behind:
~\CMSModules\Bizforms\InlineControls\BizFormControl.ascx.cs by amending the
SetupControl() method. You will set the BizForm property
UseColonBehindLabel to false like this (be aware of this change in case of future upgrade):
this.Bizform1.UseColonBehindLabel = false;
On the other hand, in case you use it as a webpart, there is an easy solution for that. Please locate to webpart properties (on the Design tab) where you can see the
'Use colon (:) in labels' property. You need to set it to false.
In ASPX templates you can add property to you your BizForm web part
<uc1:BizForm ... UseColonBehindLabel="false" />
-ov-
This feature is not natively supported in Kentico CMS version 4.1, but you can try to ensure this functionality using following workaround:
First of all, you need to create all of the necessary BizForm fields with allow empty value property checked. Then you need to create as many alternative forms (please see
http://www.kentico.com/docs/devguide/alternative_forms_module_overview.htm and related topics in the same section for more details) for your BizForm as the number of pages you require. Each alternative form will be configured to show only fields you require to be displayed on that alternative form - page. Then you would need to modify e.g. ~\40\CMSWebParts\BizForms\bizform.ascx file and add some for example "next" button to this web part. The aim of this “next” button will be to change Alternative form (viewBiz.AlternativeFormFullName) and also to save the BizForm data (viewBiz.BasicForm.SaveData(string redirect_to_URL)). After first page is saved, Bizform entry is created and you need then just to update existing one using BizForm API:
http://www.kentico.com/docs/devguide/bizforms_api.htm