ez.no / ezpublish / documentation / customization / components / form processing
These documentation pages are no longer maintained. Please visit the new documentation site.
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
James Ward
Tuesday 22 February 2005 7:56:49 pm
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
Bruce Morrison
Tuesday 02 March 2004 5:26:02 am
Should read
<form action={"/form/process"|ezurl} method="post">
B
Form precessing example does not work
James Ward
Tuesday 07 October 2003 6:26:36 pm
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?