Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Instant Building Multi-Page Forms with Yii How-to
  • Table Of Contents Toc
  • Feedback & Rating feedback
Instant Building Multi-Page Forms with Yii How-to

Instant Building Multi-Page Forms with Yii How-to

By : Uday Sawant
4 (3)
close
close
Instant Building Multi-Page Forms with Yii How-to

Instant Building Multi-Page Forms with Yii How-to

4 (3)
By: Uday Sawant

Overview of this book

Yii is a high-performance PHP framework for rapid web application development. It is well-designed, well-supported, easy to learn, and easy to maintain. Forms are the basic method used to collect information on the Internet, and in cases like user registration and payment process, there's a lot of data to be presented and the lists can get lengthy. Instant Building Multi-Page Forms with Yii is a simple and descriptive how-to that provides step-by-step recipes to help you in converting your lengthy forms into short, interactive forms. It will guide you through the inbuilt features of Yii framework to help you with this complex job. The book starts with the basics of Yii and will guide you through creating simple forms before then converting your simple forms into multi-page forms. It will use the capabilities of Yii to ease the tasks required to do this. Yii eases your work by providing options like database connectivity. We will also take a look at the automated code generation capabilities of Yii in generating forms and necessary CRUD operations, as well as looking at how to divide a single long form into multiple views with same controller/action, and then add form validations and AJAX support to the forms. We will also cover the upload process and how to customise Yii's looks.
Table of Contents (7 chapters)
close
close

Getting started with Yii (Simple)


We will start with the basic setup of the Yii environment; that is, connecting to a database server and automated generation of Gii and forms with Yii.

Getting ready

This book assumes that you are familiar with the PHP development environment and have a basic development environment set up for PHP application development.

Download the Yii framework from http://www.yiiframework.com/ and extract its framework folder outside your Public_html folder or web root folder. Your application will refer to Yii Bootstrap, Yii.php, located inside the Framework folder.

How to do it...

Let's move to creating the web application. We will use the command-line utility of Yii to generate the new Yii application.

  1. Open the command prompt or a console under Linux.

  2. Change the current folder to where the framework has been extracted and enter the following command:

    yii> framework/yiic  webapp  webRoot/sampleapp 
  3. Access the newly generated application at http://localhost/sampleapp/index.php.

How it works...

The command will ask you for confirmation and will then generate the basic structure of the Yii application. You can find the details of the directory structure at http://www.yiiframework.com/wiki/155/the-directory-structure-of-the-yii-project-site/.

Yii has already created a few simple pages with a Contact Us form and a Login form. Following is the screenshot of the default Contact Us form:

Visually different images
CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Instant Building Multi-Page Forms with Yii How-to
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon