Path

ez.no / ezpublish / documentation / customization / components / form processing


Form processing

These documentation pages are no longer maintained. Please visit the new documentation site.

Warning: The form is by design insecure so don't enable unless you know what you are doing.

eZ publish has functionality to simply process any HTML form
and send the result on e-mail.

Forms sent to the /form/process function will be processed and
sent on e-mail to either: the default information collection receiver
set in site.ini

[InformationCollectionSettings]

EmailReceiver=mymail@example.com

You can also specify the e-mail receiver using the hidden variable
MailSendTo.

The mail sender is the default specified in site.ini:

[MailSettings]

EmailSender=nospam@example.com

You can also override this value by using the hidden variable MailSendFrom.

The mail subject is default "eZ publish form data", this can be overridden
using the hidden variable MailSubject.

You can specify an URL to redirect to using the RedirectTo variable, the default
is to display a message that the request was sent.

All other post variables are compiled into the mail body.

A simple example of a form with two fields.

<form action={"/form/process"|ezurl} method="post">

 

<input type="text" name="FirstName" value="" />

<input type="text" name="LastName" value="" />

 

<input type="hidden" name="MailSubject" value="Form information" />

<input type="hidden" name="MailSendTo" value="myreceiver@example.com" />

<input type="hidden" name="MailSendFrom" value="nospam@example.com" />

<input type="hidden" name="RedirectTo" value="http://ez.no" />

<input type="submit" value="Send" />

 

</form>

See also information collection, which is an alternative way of
creating forms.

NOTE: this functionality was introduced in eZ publish 3.2 from revision 2954.

Comments

Dont forget to enable form processing

The information above should be combined with the information located at:
http://www.ez.no/ez_publish/documentation/reference/modules/form

I had not enabled the form module.

Took me 2 years to figure this out ;)

Correction

<form action="/admin/form/process" method="post">

Should read

<form action={"/form/process"|ezurl} method="post">

B

Form precessing example does not work

Has anyone got the form processing example working?

It just give me an error page. /admin/form/process does not exist on my install.

3.2 rev 3500.

Is there a corrected version of this code anywhere?

Contents

Customization

Access control
eZ publish API Documentation
Content structure
Custom design
Components
    Images
    Datatypes
    Shop
    Information collection
    Search
    Form processing
    Error handling
    Icons
    Menus
    Toolbars
Tips & Tricks
Troubleshooting


Created

30/07/2003
3:52:28 pm
by Bård Farstad

Last updated

03/03/2004
9:48:00 am
by Balazs Halasy

Authors

Bård Farstad
Björn Dieding@xrow.de
Balazs Halasy



This page is part of the eZ Publish documentation. The documentation is available under the GNU Free Documentation License. All contributions will be released under the terms of this license.