Platoo FReport ComponentsForms, getting information from client.

Contents

This chapter describes how to use forms in HTML document to get information from client.


Description
In addition to showing the data, HTTP servers are able to receive data from the client and process them. Such activity is carried out according to CGI standard.

The data received from the client are forwarded to the server in Name=Value pairs. Upon using FR components such data is available with the help of TFReport.InputParamAs**** functions. There is an <INPUT> HTML element corresponding to every parameter received from the client. Components like TFREdit , TFRRadioGroup etc. derived from TFRInput are used to create such elements. All parameters can have a default value. To set the value, the FR components have respective properties such as TFREdit.HText and TFRRadioGroup.ItemIndex . To add parameters hidden from the user to the HTML document, the <INPUT TYPE=HIDDEN> element is used which corresponds to TFRHidden component.

The component's HName property, in its absence the Name property of the respective component, is used as the parameter's name.

Upon using FR components it is possible to insert into the HTML document the database data, see Database management , and the subsequently used report parameters to realise grouped or drill-down reports in case the the report parameters inserted once by the client are needed several times. In such case the names of the respective <INPUT> elements are generated automatically and with the help of these names the respective parameters are available during next requests.

In order for the client to send data to the server, the respective elements of the HTML document must be within the <FORM>...</FORM> element. The TFRForm component is used to create the HTML <FORM> element. The data is sent from the client to the server by the SUBMIT method of the <FORM> element, which can be activated from JavaScript function, or by adding the <INPUT TYPE=SUBMIT> element to the form which corresponds to the component. The client can clear all the inputs on the form or reset their default value by using the RESET method of the <FORM> element or the <INPUT TYPE=RESET> element which corresponds to the TFRButton component.