Book Image

ChronoForms 3.1 for Joomla! site Cookbook

By : Bob Janes
Book Image

ChronoForms 3.1 for Joomla! site Cookbook

By: Bob Janes

Overview of this book

Joomla! is a fantastic way to create a dynamic CMS. Now you want to go to the next step and interact with your users. Forms are the way you ask questions and get replies. ChronoForms is the extension that lets you do that and this book tells you how. From building your first form to creating rich form based applications we will cover the features that ChronoForms offers you in a clear hands-on way. Drawing on three years daily experience using ChronoForms and supporting users there is valuable help for new users and experienced developers alike. We will take you through form development step by step: from creating your first form using ChronoForms’ built-in drag-and-drop tool; validating user input; emailing the results; saving data in the database, showing the form in your Joomla! site and much more.Each chapter addresses a topic like ‘validation’ or ‘email’ and the recipes in the chapter each address a different user question from the beginners’ question ‘How do I set up an email?’ through to more advanced questions like using some PHP to create a custom email Subject line.Over eight chapters and eighty recipes we cover all of the ‘Frequently Asked Questions’ that new users and developers have about using ChronoForms. The recipe structure allows you to pick and choose just the solution that you need.
Table of Contents (17 chapters)
ChronoForms 3.1 for Joomla! Site Cookbook
Credits
About the Author
About the Reviewer
Preface

Specifying the types of input that are allowed — text, numbers, dates, and so on


The previous recipe looked at making an input required, but as we saw with the e-mail input, that often is not enough. We need to be able to check the kind of input as well as checking that the input isn't empty.

ChronoForms has some built-in validations for common types of input and it's possible to add custom checks for many more.

Getting ready

We're going to check that there is an e-mail address in the newsletter form e-mail input.

How to do it...

  1. 1. Open the form in Wizard Edit, click in the Email text input element to open the element Properties box, and check the Email box in the Validation group. Leave the Required box checked as well as we want both validations.

  2. 2. Click the Apply button in the Properties box to save the change to the element, then Save the form in the editor and re-open or refresh the newsletter form in your browser.

  3. 3. If you leave the Email field empty and submit the form, you should see...