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 (
Mailforms usually contain a
< mailform ... > ... < /mailform >
DetailsComponent must not be used inside a form.
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.to, this.cc, 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.
© 1996-2021 H.E.I. All Rights Reserved.