TYPO3 Old School: Create a simple mail form

by Michael Cannon in Featured, TYPO3 · 1 comment

TYPO3 FORM result

TYPO3′s FORM content object is pretty powerful and flexible by its own right. You often don’t need to go with the more powerful mail forms unless there’s specific functionality missing.

The code that follows shows a basic contact form for sales & support requests. It checks that the given email is valid. Upon form submission, an auto-response message is sent the submitter and the form redirects to a thank you or follow-on action page.

Name | *name=input
Email | *email=input |  | EMAIL
Phone | phone=input
Subject | subject=select | Support Request, Sales Inquiry
Request | comments=textarea
 | redirect=hidden | 20
 | auto_respond_msg=hidden | Thank you for your message.//We'll get back to you within a business day.
 | formtype_mail=submit | Submit
 | html_enabled=hidden | 0
 | from_email=hidden | [email protected]
 | organisation=hidden | Aihrus

You can change Name, Email, and Subject of above to display as you’d like on the front-end. Don’t change name, email, and subject or else the sent email from name, from email, and subject will not be what the submitter provided.

The * before name and email denotes those fields as required.

The EMAIL of email, informs TYPO3 to confirm the input as an email address before clicking submit.

Learn More

Revised & updated from original publishing.

Be Sociable, Share!

Related Entries

About Michael Cannon

Hello, I'm Michael Cannon, Peichi's smiling man, an adventurous water-ratchief technology officer, cyclist, poet, WWOOF'er and world traveler.

Previous post:

Next post: