Yii Framework Official Guide Series 16 - Using Forms: Overview

黄舟
Release: 2023-03-05 17:52:02
Original
1145 people have browsed it



Collecting user data through HTML forms is one of the main tasks of web program development. In addition to form design, developers also need to populate the form with existing or default data, validate user input, display appropriate error messages for invalid input, and save input to persistent storage. Yii greatly simplifies this workflow with its MVC structure.

When processing forms in Yii, the following steps are usually required:

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

  2. Create a controller action in response to form submission.

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

In subsequent chapters, we will introduce the specific implementation of these steps in detail.

Yii Framework Official Guide Series 17 - Using Forms: Creating Models

Yii Framework Official Guide Series 18 - Using Forms: Creating Actions

Yii Framework Official Guide Series 19 ——Using Forms: Creating Forms

Yii Framework Official Guide Series 20——Using Forms: Batch Collecting Form Inputs

Yii Framework Official Guide Series 21——Using Forms: Using the Form Builder ( CForm)

The above is the content of Yii Framework Official Guide Series 16 - Using Forms: Overview. For more related content, please pay attention to the PHP Chinese website (www.php.cn)!

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!