Component MailForm


Mail forms compose and send e-mail from the form data. An email form must contains some field components (to enter some data) and a send button (mailformbutton).

Mailforms usually contain a mailtext component that defines the text that will actually be sent. A mailform can contain a preview and/or edit button so that the user can see or edit the generated email before sending.


< MailForm ... > ... < /MailForm >


Component must not be used inside a form.
Include File: mform.hei
Session Mode: accept


Property Kind Description
OidId Id must be unique within the page. 
ToString(20) Recipient's e-mail address. 
CcString(20) List of carbon copy recipients, separated by commas. 
BccString(20) List of blind carbon copy recipients, separated by commas. 
SubjectString(50) Subject line. 
FromString(20) Sender's e-mail address. 
UsercopyCheckbox Send a copy to the user. A Mailuseraddress field must be on the form to use this function. 
MethodString(60) HTTP method to submit the form data set.
Value "post" should be used when form processing causes side effects, e.g. modifies a database, and if the form contains fieldfileupload.  


Name Description
to Destination address
cc Additional destination addresses
bcc Blind additional destination addresses
from Source address
subject Subject
mailtext Compiled email text


The component inherits Attributes, Methods, and Hookmethods from the following superclasses:

panel The ff attribute and the access functions panelobj(n) and panelfield(n) are important.


checkinput (f, form) Is called to check to form content for consistency. f contains the form fields and form the form itself. If everything is ok return null otherwise an error message.

onsend () Is called immediately before the email is sent. The variables,, this.bcc, this.subject, this.from, and this.mailtext can be read and written. On success null must be returned. Otherwise the email is not sent.

wraptext (f) This wraps the text generation. The parameter contains the form fields. At the end this.mailtext must contain the generated email text. The defbody inspects the mailtext tag and generates the email text in this.mailtext. The default wraptext just contains defbody.

It is possible to insert code that manipulates the form fields before the defbody. After the defbody this.mailtext can be manipulated. Alternatively the text can be generated completely within wraptext without using defbody.

This page was dynamically generated by the web application development tool RADpage of H.E.I.
© 1996-2018 H.E.I. All Rights Reserved.

Component Guide
  Language Guide
  Language Ref.
  Component Ref.
    Component List
    Component Table
  Class Library
  User Components
  Tryout Form
  New Features
  heitml 1
User Guide
Discussion Group