Yii Framework official guide series 16-use forms: overview

Source: Internet
Author: User
Collecting user data through HTML forms is one of the main tasks of Web application development. In addition to form design, developers also need to fill existing or default data in the form to verify user input and display the appropriate error information for invalid input...



Collecting user data through HTML forms is one of the main tasks of Web application development. In addition to form design, developers also need to fill existing or default data in the form to verify user input, display appropriate error information for invalid input, and save the input to persistent storage. Yii greatly simplifies this workflow through its MVC structure.

To process a form in Yii, follow these steps:

  1. Create a model class that represents the data fields to be collected.

  2. Create a controller action and submit the response form.

  3. Create a form related to the controller action in the view script.

In subsequent sections, we will detail the implementation of these steps.

Yii Framework official guide series 17-use forms: Create models

Yii Framework official guide series 18-use forms: create actions

Yii Framework official guide series 19-use forms: create forms

Yii Framework official guide series 20-use forms: collecting table input in batches

Yii Framework official guide series 21-use forms: use Form Builder (CForm)

The above is the Yii Framework official guide series 16-use form: overview content. For more information, see PHP Chinese website (www.php1.cn )!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.