Bitrix Site Manager

Web Forms

In this topic

  • Functions of the web-forms module
  • Storing the structure of web forms (further "forms")
  • Form questions and fields
  • Form questions
  • Form fields
  • Displaying forms
  • Storing, displaying, filtering and modifying the data collected by forms
  • E-mailing filled forms
  • Assigning user rights to various actions on the forms and form results
  • Application

    The Web Forms module can be used for:

    Samples demonstrating search and storage of site visitors’ review forms are included in the module distribution kit.

    Integration with the Statistics module allows to use the module functions to analyze the dynamics of forms filling and to acquire other information about visitors who fill in forms.

    Integration with the e-Store module allows to organize sale of various goods and services by means of filling out web review forms and transferring the acquired information to the marketing module.

    Functions of the web-forms module

    Storing the structure of web forms (further "forms")

    By using the system administrative interface, you can create the required questions and form fields.

    To create a form, the following data must be specified:

    You can define the templates for:

    The statistics module maintains the facts of filling and saving the forms through the event registration mechanism. In addition, this allows to track form filling activity dynamics on days and to draw a corresponding graph. To do it, you need to specify event type identifiers for the statistics module in the form settings.

    Form questions and fields

    After form creation questions and fields of the form can be generated.

    The form question is the collection of the question text and input fields for entering the answer to this questions.

    The form field is intended for the storage of the data defined after saving the filled form (after saving the result).

    Form questions

    To create a form question, the following data should be specified:

    The following input fields are available:

    In addition, you can specify the following:

    The following filter fields types are available:

    Form fields

    To create a field, specify its identifier, sorting order, heading, service comment and type:

    You can also specify the following:

    Single line filter text allows to use logical expressions. The logical expressions syntax is:

    Logical operation priorities in filter fields are identical to the ones in mathematic.

    Displaying forms

    To display a form, a standard all-purpose template default.php or personal unique template implementing the required logic (for example, by means of JavaScript) can be used.

    Storing, displaying, filtering and modifying the data collected by forms

    The result is the collection of data collected in the forms and saved in the database. To display the collected results in the public sections of the site, the module API can be used along with samples provided in the distribution kit. The module core is implementing the form results display in the administrative site. You can filter the result fields, form questions and sort result fields when displaying the form results.

    Result fields are:

    E-mailing filled forms

    To e-mail the form results, a special mail template must be specified in the form settings. The Create link in the mail template field generates a mail template. Upon filling and saving the form you can use the CForm::Mail function (included in the module API) for sending the data via e-mail.

    Assigning user rights to various actions on the forms and form results

    The module supports the following access rights types for each form. Each subsequent access right type includes all the previous ones.

    Access right Description
    Access denied Form and its results are totally inaccessible.
    Form filling Visitor can only fill in and save the form.
    Work with the result according to its status Visitor can operate only with the results according to the rights set for each status.
    Work with all the results according to their statuses Visitor can operate with all the results according to the rights set for each status.
    Viewing the form parameters Visitor gains the opportunity to view web-form parameters.
    Full access Includes all the above-described rights and also the rights to modify the form settings.

    Each form result must have a definite status (for example: accepted to consideration, published, draft and so on). On each web-form you can define the personal statuses set allowing to organize for each result the specific functions of workflow. In the status settings, you can define access rights both for various user groups and for the result creator. There are four actions types for which you can define access rights:

    To assign access rights in web form module, complete the following:

    1. Assign the access level for the entire web-form.
    2. Create the list of statuses for the web-form results.
    3. Define access rights for each status.