Book Image

Learning Joomla! 1.5 Extension Development

Book Image

Learning Joomla! 1.5 Extension Development

Overview of this book

Table of Contents (17 chapters)
Learning Joomla! 1.5 Extension Development
Credits
About the Author
About the Reviewer
Preface

Creating the review form


With a database table now in place, we need a friendly interface for adding reviews into the database. To start, let's create a form for entering the review data. Because the form will involve a large amount of HTML output, we will create a view for it. Inside your /administrator/components/com_restaurants folder, create a new folder called views. Because we are adding a form for entering single reviews, create a folder inside views called single. Finally, create an additional folder in single called tmpl. When you are done, the directory structure of com_restaurants should look like this:

Before displaying the HTML output there are some drop-downs, data, and other elements that need to be pulled up. The logic to do this for the single view will be contained in the view.html.php file in the /administrator/components/ com_restaurants/views/single folder. Create this file and add the following code to it:

<?php
defined( '_JEXEC' ) or die( 'Restricted access...