O'Reilly logo

MODx Web Development by Antano Solar John

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

E-mailing from forms

In this section, we will discuss how to create HTML forms in MODx that can send mail to the moderator of the site. Such forms are often used as enquiry forms or feedback forms. When a user enters some information, the moderator receives an e-mail with the details. In MODx, you can achieve this by using the eForm snippet. eForm can also validate the form before sending out the e-mail. The eForm snippet comes bundled with MODx and hence you don't have to install it.

To start using eForm, let us create a resource with the following details.

Field Name

Field Value

Title

Enquiry Form

Uses template

Learning MODx default template

Document content

[!eForm? &formid=`EnquiryForm` &subject=`[+subject+]` &to=`youremailid` &tpl=`EnquiryForm` ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required