Icon Using HTML Forms

HTML forms in Elevate Web Builder are represented by the THTMLForm component. HTML forms are the legacy way of allowing a user to input information into various controls on a form and have that information sent to the web server using an HTTP POST request. The THTMLForm component is a simple container control, which gives you the option of having multiple sub-forms within the same visual form, each with its own ability to submit information independently of the other.

Input Controls
The following standard controls can be used to input information that can be sent as part of the form submittal process:

ControlDescription
Image TEditSingle-line edit control
Image TPasswordEditSingle-line password edit control
Image TMultiLineEditMulti-line edit control
Image TCheckBoxCheck box control
Image TRadioButtonRadio button control
Image TListBoxList box control
Image TCalendarCalendar control
Image TButtonComboBoxButton combo box control
Image TEditComboBoxEditable combo box control
Image TDateEditComboBoxEditable date combo box control
Image TDialogEditComboBoxEditable dialog combo box control
Image TFileComboBoxFile upload combo box control

Information These are only the standard controls included with Elevate Web Builder's standard component library, so this list does not include any installed 3rd party controls that may also allow usage with an HTML form.

Submitting the Input Information
In order to actually submit the input information as an HTTP POST request to the web server, complete the following steps:
  • Make sure that the THTMLForm's Encoding property is set to feMultiPartFormData. You can use other encoding types, but this is the default and supports the most common type of form submission, including submitting files using the TFileComboBox control.


  • Make sure that the THTMLForm's Method property is set to fmPost. This is the default value, so you'll probably never need to change this property.


  • Make sure that the THTMLForm's URL property is set to the desired URL.


  • Call the THTMLForm's Submit method to perform the submission. When the HTML form is submitted, all input controls contained within the HTML form are included, and the names used for the HTML form variables that are submitted are the same as the Name property of the included controls.
Testing Form Submittals
The internal web server embedded in the IDE includes support for echoing back any HTML form variables submitted using the Submit method. Just be sure to use the following URL for the THTMLForm's URL property:

http://localhost/formsubmit

Information The above URL assumes that the internal web server is listening on the standard port 80. Please see the Modifying Environment Options topic for more information on configuring the internal web server.

Redirecting Form Submittal Output
By default, the THTMLForm Submit method will direct any response from the web server to a special hidden frame that Elevate Web Builder includes to suppress any output from the submittal. This is done to prevent the web browser from navigating away from the Elevate Web Builder application itself. If you want to display the output from the HTML form submittal process, or track when the submittal is completed, you can use the THTMLForm's Output property to do so. This property allows you to specify a TBrowser control that will receive the web server response to the HTML form submittal. In addition, you can assign an event handler to the TBrowser OnLoad event to determine when the web server response has been loaded into the frame encapsulated by the TBrowser control.
Image